Catalogue
Every algorithm, step by step
18 algorithms you can watch run on your own input. Open any of them without an account — progress and XP are the only parts that need signing in.
Sorting
7 algorithmsBubble Sort
Repeatedly compares and swaps adjacent elements until sorted.
- Difficulty
- Beginner
- Average time complexity
- O(n^2)
Selection Sort
Repeatedly selects the minimum of the unsorted region and swaps it into place.
- Difficulty
- Beginner
- Average time complexity
- O(n^2)
Insertion Sort
Builds a sorted array one element at a time by inserting into place.
- Difficulty
- Beginner
- Average time complexity
- O(n^2)
Merge Sort
Divides the array in half, sorts each half, then merges them in order.
- Difficulty
- Intermediate
- Average time complexity
- O(n log n)
Quick Sort
Partitions around a pivot, then recursively sorts each partition.
- Difficulty
- Intermediate
- Average time complexity
- O(n log n)
Heap Sort
Builds a max-heap, then repeatedly extracts the maximum.
- Difficulty
- Intermediate
- Average time complexity
- O(n log n)
Radix Sort
Sorts integers digit by digit, without a single comparison.
- Difficulty
- Advanced
- Average time complexity
- O(nk)
Searching
2 algorithmsGraph
4 algorithmsBreadth-First Search
Explores a graph level by level using a queue.
- Difficulty
- Intermediate
- Average time complexity
- O(V+E)
Depth-First Search
Explores as far as possible along each branch before backtracking.
- Difficulty
- Intermediate
- Average time complexity
- O(V+E)
Dijkstra's Algorithm
Finds shortest paths from a source node in a weighted graph.
- Difficulty
- Advanced
- Average time complexity
- O((V+E)log V)
A* Search
Shortest path, guided toward the goal by a heuristic.
- Difficulty
- Advanced
- Average time complexity
- O(E log V)