A / \ B CThen post-order would process in the order: B, C, A. Pre-order would go: A, B, C. In-order would go: B, A, C. You can have depth first searches where you visit the children of a child before the siblings of a child. This is most easily done with recursion. You can have breadth first searches where you visit all your children before you visit any of your children’s children. This is usually done with a queue to track unvisited relatives.
This page is posted |
http://mindprod.com/jgloss/traverse.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\traverse.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.21.246.44] |
| |
Feedback |
You are visitor number | |