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...
Uloženo v:
| Vydáno v: | International journal of computer mathematics Ročník 20; číslo 3-4; s. 171 - 185 |
|---|---|
| Hlavní autoři: | , |
| Médium: | Journal Article |
| Jazyk: | angličtina |
| Vydáno: |
Abingdon
Gordon and Breach Science Publishers
01.01.1986
Taylor and Francis |
| Témata: | |
| ISSN: | 0020-7160, 1029-0265 |
| On-line přístup: | Získat plný text |
| Tagy: |
Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
| Shrnutí: | 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 |