Data Structures
Arrays, lists, trees, heaps, graphs — every structure, animated.
0/16 complete
- Dynamic ArraysThe most common structure — how an array grows when it runs out of space, and why it's O(1) amortized.easy
- Linked ListsNodes joined by pointers — O(1) insertion at the ends, but no random access.easy
- Stacks & QueuesTwo restricted lists — last-in-first-out and first-in-first-out — that show up everywhere.easy
- Hash TablesAverage O(1) lookup by turning a key into an array index — and how collisions are handled.medium
- StringsHow text is represented, and the common patterns used to manipulate strings efficiently.easy
- Binary Search TreesA tree that keeps values ordered for fast search, insert, and delete — and why balancing matters.medium
- Heaps & Priority QueuesA complete binary tree packed into an array that always serves the smallest item first.medium
- Graph RepresentationAdjacency lists vs adjacency matrices — how to model connections and choose the right structure for the job.medium
- Tries (Prefix Trees)A specialized tree for strings that makes prefix search fast — and how it powers autocomplete.medium
- Union-Find (Disjoint Set Union)Keep track of connected components and merge sets in near-constant time.medium
- Segment TreesRange queries and updates in O(log n) — the Swiss army knife for interval-based problems.hard
- Fenwick Trees (Binary Indexed Trees)Prefix sums with O(log n) update and query, using almost no extra memory and the i & -i bit trick.hard
- LRU CacheA fixed-size cache that evicts the least-recently-used entry, built from a hash map plus a doubly linked list for O(1) operations.medium
- Bloom FiltersA space-efficient probabilistic set that answers membership with no false negatives — but the occasional false positive.medium
- Skip ListsA sorted linked list with random express lanes that delivers balanced-tree performance — O(log n) search — with far simpler code.medium
- Deques and Ring BuffersA double-ended queue backed by a circular buffer — O(1) push and pop at both ends, with head and tail pointers that wrap around.easy