Learn
Algorithms
Interactive explanations of core algorithms, with complexity notes and related practice problems.
Algorithms·8·A→Z
Binary Search
Binary Search is a searching algorithm that finds a target in a sorted, randomly-accessible sequence by repeatedly halving the candidate range.
EasyO(log n)261 problemsBloom Filter
Three hashes set three bits per word. A 0 bit is a definite no, a full row of 1s only a maybe.
MediumO(k)5 problemsConsistent Hashing
Nodes and keys share one hash ring, and a key walks clockwise to the first node. A node leaving moves only its own arc.
MediumO(log n)2 problemsLRU Cache
Every use moves its key to the front of a recency list, and eviction takes the tail. A hash map plus a doubly-linked list keeps both steps O(1).
MediumO(1)5 problemsMerge Sort
Efficient, general-purpose, comparison-based, canonical divide-and-conquer sorting algorithm: split the array in half, recursively sort each half, then merge the two sorted halves into one.
MediumO(n log n)9 problemsMerkle Tree
Hash each block, then hash the pairs upward until one root remains. The root commits to every byte, and log n sibling hashes prove any block.
MediumO(n)7 problemsSkip List
A sorted linked list plus express lanes. Searches ride the fast lanes down, and coin flips on insert keep the lanes balanced.
HardO(log n)4 problemsToken Bucket
Requests spend tokens, time refills them, and an empty bucket says no. A rate limiter in two rules.
MediumO(1)3 problems
Showing all 8