BST insertion: start from the root, compare values — smaller goes left, larger goes right until an empty spot is found. For a balanced tree, search runs in O(log n), but for a degenerate (‘list’) one it’s O(n).
💡 Real-world example: BSTs and their balanced variants (AVL, red-black tree) form the basis of database indexes, file systems, and autocomplete algorithms.
Drag to rotate · Scroll wheel — zoom · Insert and search values