View All num of num See all Photos Amazon.com www.amazon.com Engaged Employer Overview Reviews Salaries Interviews Jobs Photos Benefits 5.3k Reviews 12k Salaries 6.4k Interviews 7.6k Jobs Follow Add Interview Follow Add Interview Interview Question Software Engineer Interview Seattle, WA Amazon.com Binary Tree - Common Ancestor of two nodes Tags: See more , See less 8 Answer Add Tags Answer Interview Answer 3 Answers ▲ 1 ▼ Find path to each of the two nodes and load both paths into the arraylist. Loop over arraylists and find the common nodes in the path. Pick the last common node. Interview Candidate on May 14, 2014 ▲ 0 ▼ this is to much extensive..you should use a recursive solution. Matteo Gobbi on Jun 15, 2014 ▲ 1 ▼ his solution is log(n) (balanced tree) and very intuitive and simple. funny on Jul 8, 2014 Interviews > Software Engineer > Amazon.com Add Answers or Comments To comment on this, Sign In or Sign Up.