Lowest common ancestor (BST)
Walk down from the root until the two values stop being on the same side.
Values50, 30, 70, 20, 40, 60, 80, 35, 45p, q 35, 45
Find the lowest common ancestor of 35 and 45.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub