Files
developer-roadmap/roadmaps/leetcode/content/lowest-common-ancestor@cHPRRjBTrznI6UBC-WQP6.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

715 B

Lowest Common Ancestor of a BST

Given a BST and two nodes, find their lowest common ancestor. Because it is a BST, you can use the values to decide whether to go left, right, or stop: the ancestor is where the two nodes diverge. This problem teaches you to exploit BST ordering as a navigation tool, rather than doing a general tree search.

Visit the following resources to learn more: