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.
The 5-Mode Loop
5 of 5 modes available
Read · See · Animate · Test · Build
Before this, understand: recursion