Question DSA-TREE-0070
HardWhat is the time complexity of finding the lowest common ancestor of two nodes in a binary tree (no parent pointers) with a single recursive pass?
- A.
O(h²)
- B.
O(n)
- C.
Sign up free to see the answer and a step-by-step explanation.