The problem, in one line. In a binary search tree, find the lowest node that has both given nodes beneath it, where a node counts as beneath itself. LeetCode 235.
The tell. The words “binary search tree”. The order in the tree says which side each value lives on, so you can decide at every node without searching both sides.
Included with a plan
This solution is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.