Question DSA-TREE-0037
EasyWhat is the lowest common ancestor (LCA) of two nodes in a tree?
- A.
The parent of the first node
- B.
The root, always
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Trees question
What is the lowest common ancestor (LCA) of two nodes in a tree?
The parent of the first node
The root, always
Sign up free to see the answer and a step-by-step explanation.
The node with the smallest value
The deepest node that is an ancestor of both