~/boss / family-tree
Lowest common ancestor (BST)
The Family Tree
Two monsters, one family tree. Find their closest common ancestor in one walk down.
Loading the fight…
How to beat it
Start at the root. Both monsters smaller than this node? Their ancestor is on the left. Both bigger? Go right. The moment they split, one each side, or you stand on one of them, that node is the closest common ancestor.
Now the real boss
Interviews ask for the code. Watch it run, then write it yourself, tested in Python, C++ or Java.
On your phone? Writing code is easier on a laptop: open bossfight.dev/problems/search-tree-meeting-point there. Sign in with your email to keep your progress on every device.