Interview Question

Software Engineering Intern Interview

LCA problem with no parent pointers. Given the root of a

  tree and pointers to two nodes contained in that tree, return the lowest common ancestor of the two nodes. IE, the common ancestor furthest from the root.
Answer

Interview Answer

1 Answer

0

Was the data structure a binary tree or a binary search tree?

Anonymous on Apr 26, 2014

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up