Data Structures and Memory Hierarchies
-
Dynamic Array Growth and Capacity Hysteresis
Count copies under geometric resizing and choose a shrink threshold that prevents repeated resizing around one boundary.
-
Amortized Work and Per-Operation Latency
Turn a resize spike into bounded background copying and account for accesses while two arrays coexist.
-
The Word-RAM Model and Packed Representations
Use a word-size assumption to justify constant-time address and digit access, and state where multiword costs reappear.
-
Linear-Time Binary Heap Construction
Explain why bottom-up heapification takes linear time by summing the heights of the subtrees actually repaired.
-
Indexed Priority Queues and Decrease-Key
Maintain a key-to-position map alongside a heap and use it to repair an entry after a priority change.
-
Disjoint-Set Union and Path Compression
Maintain connectivity under insertions and explain how size-based linking and path compression share the cost of finding representatives.
-
Rollback Union-Find for Offline Connectivity
Answer connectivity queries across a sequence with removals by storing reversible unions and organizing edge lifetimes.
-
Balanced Search Trees and Rotations
Use a local rotation to preserve key ordering and derive why bounded height difference gives logarithmic depth.
-
Order-Statistic Trees and Augmented Nodes
Augment a balanced search tree with subtree sizes to look up ranks and maintain the counts through rotations.
-
Prefix Tries and Path Compression
Use prefix structure to answer exact and prefix queries and compress unary runs without losing key boundaries.
-
B-Trees, Page Layout, and Fan-Out
Estimate the branching factor of a page-oriented index and follow how a split propagates separator keys.
-
The External-Memory Model and Block Transfers
Compare sequential scans and random accesses when the scarce resource is movement of entire blocks.
-
Cache-Oblivious Matrix Transposition
Divide a transpose into cache-fitting rectangles without choosing a hardware-specific tile size.
-
Universal Hashing and Collision Expectations
Derive an expected chain size from pairwise collision probabilities and separate the hash seed from the chosen keys.
-
Open Addressing, Tombstones, and Rebuilding
Explain why a deletion must preserve the probe path and distinguish live occupancy from occupied-or-deleted slots.
-
Robin Hood Hashing and Probe Displacement
Use resident displacement to decide swaps and terminate unsuccessful searches early under a deletion policy that preserves the rule.
-
Cuckoo Hashing and Slot Assignment
Interpret two-choice hashing as orienting edges toward storage slots and explain why insertion may require rebuilding.
-
Fenwick Trees for Dynamic Prefix Sums
Decompose a prefix into low-bit blocks and derive the update route through the represented ranges.
-
Segment Trees and Lazy Range Updates
Represent intervals hierarchically and defer child updates while keeping every node’s aggregate correct.
-
Persistent Data Structures and Path Copying
Keep old versions of a tree by copying only the nodes whose contents or child pointers change.