Prep Library
Algorithms & Data Structures
The data structures and algorithm families every technical interview assumes you know cold — each with intuition, complexity, and a reference implementation.
Data structures
Overview
Data structures are the containers that determine how efficiently you can store, find, and update data. This group covers the essential building blocks — from linear arrays and lists to hierarchical trees, heaps, and specialized structures like tries and union-find — along with the time/space tradeoffs that dictate when to reach for each.
Amortized O(1) append via doubling.
O(1) insert/delete with a pointer.
LIFO and FIFO building blocks.
Average O(1) lookup via hashing.
Hierarchies and ordered search.
O(log n) min/max extraction.
Prefix tree for string lookups.
Near-O(1) connectivity.
O(log n) range queries + updates.
Algorithm families
Overview
Algorithm families are the standard problem-solving strategies you compose over data structures: sorting, searching, graph traversal, shortest paths, dynamic programming, greedy, backtracking, and bit tricks. Knowing each family's guarantees and complexity lets you pick the right tool and justify it.
Merge, quick, heap, counting.
Search on sorted data or answer space.
Explore connectivity and shortest hops.
Weighted shortest paths.
Optimal substructure + memoization.
Locally optimal, provably global.
Choose, explore, un-choose.
XOR tricks and bit masks.
Where this content comes from
For full transparency, this library's content is curated and verified from these sources: