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...
Gespeichert in:
| Veröffentlicht in: | International journal of computer mathematics Jg. 20; H. 3-4; S. 171 - 185 |
|---|---|
| Hauptverfasser: | , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
Abingdon
Gordon and Breach Science Publishers
01.01.1986
Taylor and Francis |
| Schlagworte: | |
| ISSN: | 0020-7160, 1029-0265 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Zusammenfassung: | 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 |