Abstract

We survey and classify the various algorithms for traversing binary trees in the three principal orders and the related two- and three-visit traversal orders. For each class of algorithms we determine which of the traversal orders may be effected by means ofloop-free traversal algorithms. Although, in general, these are multi-visit traversal orders, we indicate how the algorithms may be modified to yield loop-freesingle-visit traversal algorithms in “non-standard” orders. We also exhibit and discuss the close relationship between the various stack-based algorithms and the other classes of algorithms.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call