Algorithms, Step by Step
Every demo replays a real, recorded run. Step through it, watch the code light up line by line, and copy it in Python, TypeScript or Go.
Sorting
Bubble Sort
O(n²)Swap neighbors until the biggest value bubbles to the end.
Insertion Sort
O(n²)Slide each new value left until it fits, like sorting a hand of cards.
Selection Sort
O(n²)Find the smallest value left and put it next in line.
Cocktail Shaker Sort
O(n²)Bubble sort that sweeps both ways: big values go right, small values go left.
Comb Sort
O(n²)Bubble sort with a shrinking gap, so small values near the end move fast.
Gnome Sort
O(n²)One pointer walks forward, and steps back to swap whenever two values are out of order.
Odd-Even Sort
O(n²)Compare every even pair, then every odd pair, until nothing moves.
Shell Sort
DependsInsertion sort over big gaps first, then smaller ones, then 1.
Heap Sort
O(n log n)Turn the array into a max-heap, then pull the biggest value off the top, n times.
Searching
Linear Search
O(n)Check every value, left to right, until you find the key.
Binary Search
O(log n)Check the middle of a sorted array and throw away the half that can’t hold the key.
Jump Search
O(√n)Jump ahead √n at a time, then walk back through one block.
Interpolation Search
O(log log n)Guess where the key should be from its value, like opening a dictionary near the right letter.
Exponential Search
O(log n)Double a bound until it passes the key, then binary search that range.
Ternary Search
O(log n)Split a sorted array into thirds with two midpoints and keep one third.
Early access
Join Cohort 0
The first group to try the full site before anyone else. We start with algorithms and data structures, then go further into computer science.
- Run your own code and watch every step
- See the exact step where your logic breaks
- Vote on what we animate next
- Get the private link before public launch