Amazon.com

  www.amazon.com
  www.amazon.com

Interview Question

Software Development Engineer Intern Interview

given a node in a binary search tree, find the next highest

  value (in-order successor) assuming that the nodes have a parent link
Answer

Interview Answer

2 Answers

0

Why do you need parent link? Shouldn't this be the left-most child of the right child?

jamie on Feb 9, 2014
0

Parent would be needed in case the given node is a leaf node.

Abhishek on Feb 17, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.