Algorithm visualizer
Pick an algorithm, enter your own numbers and play it one step at a time — every step explains what is happening.
Sorting
- Bubble Sort — O(n²) time, O(1) space
- Selection Sort — O(n²) time, O(1) space
- Insertion Sort — O(n²) time, O(1) space
- Merge Sort — O(n log n) time, O(n) space
- Quick Sort — O(n log n) time, O(log n) space
Searching
- Linear Search — O(n) time, O(1) space
- Binary Search — O(log n) time, O(1) space
Linked List
- Reverse a Linked List — O(n) time, O(1) space
- Linked List Insertion — O(n) time, O(1) space
- Linked List Deletion — O(n) time, O(1) space
Trees
- Inorder Traversal — O(n) time, O(h) space
- Preorder Traversal — O(n) time, O(h) space
- Postorder Traversal — O(n) time, O(h) space
- Level Order Traversal (BFS) — O(n) time, O(w) space
- Binary Search Tree Search — O(log n) time, O(1) space