chetan12189
BAN USER
Questions (2)
Comments (4)
Reputation 160
- 0of 0 votes
AnswersGiven a Binary Search tree along with the parent pointer, find the next largest node for the given node. Give the time and space complexity. The node Structure is
- chetan12189 in India
class Node {
Int data;
Node left;
Node right;
Node parent;
}| Report Duplicate | Flag | PURGE
Amazon SDE1 Algorithm
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
another 2 cases
1.if parent is same as that of given node
2.if given node has no right child and given node is right of parent then...
Comment hidden because of low score. Click to expand.
0
of 0 vote
in case if a node has no childrens then its parent could be the next largest. One cannot wonder in the written test for a problem statement
- chetan12189 May 14, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
can you please provide concrete solution
- chetan12189 May 14, 2013Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
its the first thing comes to the mind, i think there are too many validations to be checked
- chetan12189 May 14, 2013