About CS Visualizations

CS Visualizations is a free, open-source educational platform that makes computer science algorithms and artificial intelligence concepts accessible through interactive, step-by-step visualizations. We believe that seeing an algorithm execute — watching data transform, weights update, and attention patterns form — builds deeper understanding than reading about it ever could.

Our Mission

Computer science education has a gap between textbook theory and practical intuition. You can memorize that quick sort is O(n log n) average case, but until you watch the partitioning happen step by step — seeing the pivot selected, elements compared and swapped, sub-arrays recursively sorted — the algorithm remains abstract.

The same is true for machine learning. Reading that backpropagation uses the chain rule to compute gradients is one thing. Watching gradients flow backward through layers, seeing weights update, and observing the network's predictions improve over training iterations transforms an equation into understanding.

Our mission is to build the most comprehensive, interactive learning platform for algorithms and AI — one where every concept can be stepped through, paused, rewound, and explored at your own pace. Every visualization shows real code executing alongside the animation, so you always know exactly what operation is happening and why.

What We Cover

Sorting Algorithms

13 sorting algorithms from bubble sort to Tim Sort, each with animated bar visualizations, synchronized code highlighting, and performance metrics. Watch comparisons, swaps, and partitioning happen in real time. Understand why O(n log n) algorithms outperform O(n²) by seeing it, not just reading it.

AI Fundamentals

13 lessons covering the building blocks of artificial intelligence: perceptrons, neural networks, activation functions, loss functions, gradient descent, backpropagation, CNNs, RNNs, and embeddings. Each lesson uses real mathematical examples with interactive scatter plots, network diagrams, and loss curves.

Transformer Architecture

10 lessons dissecting the architecture behind GPT, BERT, and modern AI. Step through self-attention with interactive heatmaps showing which words attend to which. See Query/Key/Value projections as matrix operations. Compare multi-head attention patterns. Understand BERT vs GPT vs encoder-decoder.

Large Language Models

10 lessons explaining how ChatGPT, Claude, and modern LLMs work. From tokenization (BPE) through pre-training, scaling laws, text generation, sampling strategies, fine-tuning, RLHF alignment, prompt engineering, and context windows. See probability distributions, loss curves, and token flows.

How Our Visualizations Work

Every algorithm and lesson on CS Visualizations follows the same interactive pattern:

1

Pre-computed steps

Each algorithm generates a deterministic sequence of steps from the input data. No randomness — the same input always produces the same visualization, making it reliable for learning.

2

Synchronized code + visualization

As you step through the algorithm, the relevant lines of code are highlighted alongside the animated visualization. You see exactly what the code does at each moment.

3

Play, pause, and step

Control the pace. Play at adjustable speed for an overview, or step through one operation at a time for deep understanding. Rewind to review any step.

4

Real math, real examples

AI lessons use concrete numbers throughout. When we say a neuron computes a weighted sum, we show you the actual weights, inputs, and result — not just the formula.

Who This Is For

CS Visualizations serves learners at every level:

  • CS students studying algorithms and data structures — see what your textbook describes, animated step by step
  • Interview candidates preparing for coding interviews — build intuition for sorting, searching, and graph algorithms
  • ML beginners learning neural networks — follow data from input through hidden layers to output, watching weights update
  • AI practitioners deepening their understanding — see attention heatmaps, gradient flow, and embedding spaces in action
  • Educators teaching CS and ML — use our presentation mode in lectures and classrooms

Built With

CS Visualizations is built with modern web technologies for fast, smooth, accessible experiences:

Next.jsReactTypeScriptTailwind CSSFramer MotionRadix UIMDX

The project is open source and available on GitHub. Contributions, feedback, and suggestions are welcome.

Ready to start learning?

46 interactive lessons, 13 sorting algorithms, and 15 in-depth articles — all free.