Data Structures, Explained Like You're Five: Binary Search Trees
You know the game "guess my number, I'll say higher or lower"? Every guess throws away half the remaining numbers. A binary search tree is that game frozen into a shape: every node has a smaller-branch on its left and a bigger-branch on its right.
The whole idea in one sentence
Each node's left side holds only smaller values and its right side holds only bigger ones, so finding a value means walking down, going left or right, and skipping half the tree at every step.
Watch it happen
Hit Play. Watch each new value walk down the tree — smaller-left, bigger-right — until it finds an empty spot. Then watch a search dive straight to a deep value in just a few hops.
Why interviewers love it
A search tree turns "scan everything" (O(n)) into "halve it each step" (O(log n)) — the same trick as binary search, but one you can grow and shrink. Trees show up constantly in interviews because so many problems are really tree-walks in disguise, and recursion clicks once you see one. The catch worth mentioning: feed a tree already-sorted data and it degenerates into a glorified linked list — which is exactly the problem the next post solves.
Smaller-left, bigger-right. That one rule is what lets every comparison throw away half of what's left — O(log n) search, insert, and delete in a balanced tree.