The Interactive Algorithm Visualizer, Step by Step
A free sorting algorithm visualizer that goes further — searching, graph, and data structure visualization too, with synchronized pseudocode on every step. Understand how algorithms work, not just what they do.
17 algorithmsFree foreverNo sign-up required
Watch every comparison happen
Step by Step
Walk through every comparison, swap, and insertion. Control the pace with play, pause, and scrub through steps.
Real Code Sync
See the algorithm source code highlighted in real-time as each step executes. Connect the visual to the code.
Race Mode
Compare algorithms side-by-side on the same input. See which one is faster and understand why.
Sorting, Searching, Graph & Data Structure Visualizations
Data Structures
7Stack (LIFO)
Last In, First Out data structure. Push adds to the top, pop removes from the top.
Time: O(1)Space: O(n)
lifolinearfundamental
Queue (FIFO)
First In, First Out data structure. Enqueue adds to the rear, dequeue removes from the front.
Time: O(1)Space: O(n)
fifolinearfundamental
Linked List
Linear data structure where each node points to the next. Supports insert, delete, and search with traversal.
Time: O(n)Space: O(n)
linearpointer-baseddynamic
Binary Search Tree
InteractiveTree where left child < parent < right child. Supports O(log n) insert, search, and delete.
Time: O(log n)Space: O(n)
treerecursiveordereddynamic
AVL Tree
InteractiveSelf-balancing BST that maintains O(log n) height via rotations after every insert/delete.
Time: O(log n)Space: O(n)
treerecursivebalancedrotations
Min/Max Heap
Complete binary tree where parent is always smaller (min) or larger (max) than its children.
Time: O(log n)Space: O(n)
treecompletepriority-queuearray-based
Hash Table
Array of buckets with chaining. Hash function maps keys to bucket indices for O(1) average operations.
Time: O(1)Space: O(n)
hashingchainingkey-valuefundamental
Graph
3BFS (Breadth-First)
Explores a graph level by level using a queue. Finds shortest path in unweighted graphs.
Time: O(V+E)Space: O(V)
graphtraversalqueueshortest-path
DFS (Depth-First)
Explores a graph by going as deep as possible along each branch before backtracking, using a stack.
Time: O(V+E)Space: O(V)
graphtraversalstackbacktracking
Dijkstra's Algorithm
Finds the shortest path from a source to all other nodes in a weighted graph with non-negative edges.
Time: O(V²)Space: O(V)
graphshortest-pathgreedyweighted
Searching
2Linear Search
Scans the array left to right, checking each element until the target is found or the end is reached.
Time: O(n)Space: O(1)
sequentialunsortedsimple
Binary Search
Divides a sorted array in half each step, comparing the middle element with the target.
Time: O(log n)Space: O(1)
divide-and-conquersorted-inputefficient
Sorting
5Bubble Sort
Repeatedly steps through the list, compares adjacent elements, and swaps them if out of order.
Time: O(n²)Space: O(1)
comparisonin-placestableadaptive
Selection Sort
Finds the minimum element and places it at the beginning, repeating for each position.
Time: O(n²)Space: O(1)
comparisonin-placeunstable
Insertion Sort
Builds the sorted array one item at a time by inserting each element into its correct position.
Time: O(n²)Space: O(1)
comparisonin-placestableadaptive
Merge Sort
Divides the array in half recursively, sorts each half, then merges the sorted halves back together.
Time: O(n log n)Space: O(n)
divide-and-conquerstablecomparisonnot-in-place
Quick Sort
Selects a pivot element, partitions the array around it, then recursively sorts both sides.
Time: O(n log n)Space: O(log n)
divide-and-conquerin-placeunstablecomparison
Run your first sort
Watch Bubble Sort walk an array one comparison at a time — then race it against Quick Sort. No sign-up required.
Watch Bubble Sort →