View All num of num See all Photos Amazon.com This employer has taken extra steps to respond to reviews and provide job seekers with accurate company information, photos, and reviews. Interested for your company?Learn More. www.amazon.com Employer Engaged Overview Reviews Salaries Interviews Jobs Photos Benefits 4.4k Reviews 11k Salaries 5.7k Interviews 10k Jobs Follow Add Review or Salary Follow Add Review or Salary Interview Question Software Design Engineer Interview Seattle, WA Amazon.com Binary tree with parent pointers, given two nodes find common ancestor. Tags: data structures, programming See more , See less 8 Answer Add Tags Answer Interview Answer 3 Answers ▲ 0 ▼ Hint: use a hash table Interview Candidate on Mar 19, 2009 ▲ 0 ▼ For each node traversed from the root,if both values are less than the current Node, then move to the leftif both values are greater than the currentNode, then move to the right,if the value of current Node is between value 1 and value 2, then you have found the nearest common ancestor. Rajiv on Aug 23, 2010 ▲ 0 ▼ Rajiv, you can't do that is tree is by parent pointers. you need to bubble up from the given nodes and put parents to a hash. dantepy on Apr 30, 2011 Add Answers or Comments To comment on this, Sign In or Sign Up.