C/c

Advertisement


Question
sir 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.

Answer
Hello

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  

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Expertise

No longer taking questions.

Experience

No longer taking questions.

Education/Credentials
No longer taking questions.

©2012 About.com, a part of The New York Times Company. All rights reserved.