All algorithms
Jump straight to any algorithm. For a guided order, follow the learning path.
Searching
Sorting
- Bubble sortSwaps, invariant, O(n²)
- Selection sortPicking the minimum, comparing costs
- Insertion sortSorted prefix, best and worst case
- Merge sortDivide and conquer, recursion
- Quick sortPartitioning, average vs worst case
- Heap sortMax-heap in the array, in-place O(n log n)
- Counting sortSorting without comparing; counts and prefix sums
- Radix sortDigit by digit; why stability matters
Graphs
Data structures
- StackLast in, first out; push, pop and underflow
- QueueFirst in, first out; enqueue, dequeue and the front
- Binary search treeOrdered tree; insert, search and in-order walk; height
- Binary heapMin-heap in an array; sift-up, sift-down, priority queue
- Linked listNodes and links; insert at the head, walk, search and delete
- Hash tableHash function, buckets, chaining and collisions