traverse : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

traverse
To visit the nodes of a tree. There are three common ways of doing it. Consider the following tree:
   A
 /   \
B     C
Then 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
on the web at:

http://mindprod.com/jgloss/traverse.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\traverse.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.21.246.44]
You are visitor number