C/c
Expert: Zlatko - 9/26/2011
Questionsir thanks for your concern about,my doubts.
todays my doubt is about tress.
what is meant by "inorder predecessor",inorder successor" in binary tress?please tell.
AnswerHello
Look at this picture
http://en.wikipedia.org/wiki/File:Sorted_binary_tree.svg
The in-order traversal sequence of the tree in the picture is this: A, B, C, D, E, F, G, H, I
Predecessor means "the one before", so the in-order predecessor of E is D, because D comes just before E
Successor means "the one after", so the in-order successor of E is F because F comes just after E.
The picture comes from this article
http://en.wikipedia.org/wiki/Tree_traversal
The article gives you the steps to do the traversal for pre-order, in-order, and post-order.
I hope that answers your question.
Best regards
Zlatko