Search
⌘K
Get Premium
Leetcode 235. Lowest Common Ancestor of a Binary Search Tree
Given a BST and two nodes p and q, find their lowest common ancestor — the deepest node that is an ancestor of both. Leverage BST ordering to traverse from the root until you reach the first node where p and q fall on different sides (or equal the node), which is the LCA.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid December, 2025
Junior
Late November, 2025
Senior
Mid September, 2025
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.