for ques 3:
]1) If right subtree of node is not NULL, then succ lies in right subtree.
Do following.
Go to right subtree and return the node with minimum key value in right
subtree.
2) If right sbtree of node is NULL, then succ is one of the ancestors. Do
following.
Travel up using the parent pointer until you see a node which is left child
of it’s parent. The parent of such a node is the succ.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to