A study of binary tree traversal algorithms and a tag-free threaded representation

Starting from a stack-based binary tree traversal algorithm for preorder and/or inorder, we derive an algorithm recently discovered by J. M. Morris which requires neither stack nor tag fields. This algorithm may also be derived from the familiar threaded binary tree traversal algorithm. By demonstra...

Full description

Saved in:
Bibliographic Details
Published in:International journal of computer mathematics Vol. 20; no. 3-4; pp. 171 - 185
Main Authors: Fenner, T.I., Loizou, G.
Format: Journal Article
Language:English
Published: Abingdon Gordon and Breach Science Publishers 01.01.1986
Taylor and Francis
Subjects:
ISSN:0020-7160, 1029-0265
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Starting from a stack-based binary tree traversal algorithm for preorder and/or inorder, we derive an algorithm recently discovered by J. M. Morris which requires neither stack nor tag fields. This algorithm may also be derived from the familiar threaded binary tree traversal algorithm. By demonstrating how searching may proceed in parallel with traversal, we show that the algorithm is "almost read-only". This leads to a new representation for threaded binary trees requiring no tag fields. We show how to perform the usual operations efficiently for this representation, including strictly read-only traversal. In addition, we analyse the performance of variants of the traversal algorithm for binary trees represented with/without threads and with/without tag fields.
ISSN:0020-7160
1029-0265
DOI:10.1080/00207168608803542