Binary trees, BSTs, AVL, tries, and segment trees — hierarchical data structures that power search, indexing, and parsing.
Five passes over the same idea, each from a different angle. Do them in order, or jump to whichever you need.
Trees are hierarchical structures where each node has a parent (except the root) and zero or more children. Binary search trees enable O(log n) search. Self-balancing trees (AVL, Red-Black) guarantee worst-case O(log n). Tries handle prefix search. Segment trees and Fenwick trees power range queries. Understanding trees is essential for databases, compilers, and file systems.