Problems / Trees / Lowest Common Ancestor of a BST
#52 Medium Time O(n) Space O(n) Animated

Lowest Common Ancestor of a BST

Find the LCA of two nodes in a BST.

LeetCode ↗
Approach: BST Properties (Iterative)
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps