Hierarchical search and priority order. Work through the operation contract, runnable case, and cost before selecting the structure for a real workload.
Lessons
- Binary search trees: preserve order through every branch
- Binary heaps: select the next priority with a tie rule
- Tries: make prefix search distinct from complete-key lookup
Practice and next steps
- Project: choose structures for a dispatch board
- Project: audit depot connectivity and daily ranges
- Linear and hash structure decisions
- Tree, graph, and range structure decisions
- DSA Tutorial
AVL trees: restore height balance after insertion
Skip lists: randomized levels over an ordered bottom chain
B+ leaf pages: split full pages and keep range order
Red-black trees: audit color and black-height invariants
B-trees: split full pages during ordered insertion
Interval trees: prune overlap search with subtree maximums
Compressed tries: split shared edge labels at the divergence
Red-black insertion: rotate and recolor an ordered index
B+ trees: propagate leaf splits through multiple levels
Balanced interval indexes: rotate height and maximum metadata together
Compressed tries: delete exact keys and merge unused edges
B+ deletion: borrow, merge, and repair separators
Indexed binary heaps: decrease a queued priority
Red-black deletion: move color before removing a key
AVL interval deletion: repair balance and maximum endpoints
Page journals: replay committed index changes
Persistent ordered indexes: copy search paths, share subtrees
Framed journals: detect a torn tail before replay
Failure-linked tries: find overlapping alert terms in one scan
Suffix arrays: indexed substring search and adjacent LCP
K-d trees: exact nearest depot with plane pruning
Binary-tree traversals: four orders without recursion
AVL order statistics: maintain subtree sizes for rank and select
Wavelet tree: subarray counts and order statistics
Implicit treap: edit positions and reverse a range
Heavy-light decomposition: sum weights along a tree path
Binary lifting: ancestors and common managers
Suffix automata: index substrings as text arrives
Packed R-tree: search intersecting depot rectangles
Binary tries: choose a maximum-XOR fingerprint
Merkle trees: verify an indexed scan record
Two heaps: maintain an exact running median
Expiry heaps: invalidate stale TTL records on replacement
D-ary heaps: trade shallower ascent for wider extraction
Pairing heaps: meld roots and pair children on removal
Binomial heaps: carry equal-degree trees during merge
Radix heaps: queue nondecreasing integer priorities
Double-ended queues: reconcile min and max heaps
Point-region quadtrees: subdivide crowded cells
Bounding-volume hierarchies: prune box overlap searches
Morton ordering: decompose a grid window into code ranges
Ropes: share text chunks across immutable revisions
Level-order unary degree tries: encode child runs as bits
Buddy blocks: split powers of two and reunite partners
Ternary search trees: branch by character and continue prefixes
Binary radix routing: choose the longest matching prefix
Splay Trees: Access Rotations and Join Invariants
Cartesian trees: preserve sequence order under a heap minimum
Leftist heaps: keep the right spine short for meld
Two-dimensional range trees: count a static rectangle
Van Emde Boas trees: successor in a bounded integer universe
Scapegoat trees: rebuild a deep insertion subtree
Palindromic trees: index distinct palindromes as text arrives
Balanced-parentheses trees: encode an ordered hierarchy
BK-trees: search incident labels within edit distance
Vantage-point trees: nearest depots by a metric radius
FM-index backward search: narrow a suffix interval by character
Euler-tour RMQ: answer static common ancestors in constant query time
X-fast trie: predecessor and successor in a fixed integer universe
Compressed suffix trees: locate patterns across a frozen text
Skew heaps: meld priorities by swapping child paths
Fibonacci heaps: cut on decrease and consolidate on removal
Tournament trees: merge sorted runs through one winner path
Priority search trees: report events in a three-sided region
Reduced ordered decision diagrams: share identical rule branches
LZ78 phrase tries: emit dictionary index and next symbol
Huffman trees: assign prefix codes from symbol frequencies
Ordered treaps: split, join, and select depot keys
Span skip lists: rank and select without a full scan
Zero-suppressed diagrams: share sparse dispatch set families
Double-array tries: static incident-code transitions with BASE and CHECK
Adaptive radix trees: grow byte-edge nodes as incident codes branch
Minimal acyclic dictionaries: merge equivalent word suffix states
Min-max heaps: remove either end of one dispatch priority array
Patricia binary routing: compress chains without losing prefix matches
Sliding medians: expire heap entries by event identity
Ball trees: prune exact nearest-depot search with radius bounds
