Abstract
It is well-known that given the inorder traversal of a binary tree's nodes, along with either one of its preorder or postorder traversals, the original binary tree can be reconstructed using a recursive algorithm. In this short note we provide a short, elegent, iterative solution to this classical problem.
Similar content being viewed by others
References
A. V. Aho, J. E. Hopcroft and J. D. Ullman,The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, Mass, 1974.
T. Hikita,Listing and counting subtrees of equal size of a binary tree, Info. Processing Letters, vol. 17, pp. 225–229, 1983.
G. D. Knott,A numbering system for binary trees, Comm. of ACM, vol. 20, pp. 113–115, 1977.
D. E. Knuth,The Art of Computer Programming, Vol. I, Fundamental Algorithms, Second Edition, Addison-Wesley, Reading, Mass., 1973.
M. Solomon and R. A. Finkel,A note on enumerating binary trees, Jour. of ACM, vol. 27, pp. 3–5, 1980.
Author information
Authors and Affiliations
Additional information
This research was done while the author held a Navy/ASEE Summer Faculty Research Associateship at the Naval Research Laboratory
Rights and permissions
About this article
Cite this article
Burgdorff, H.A., Jajodia, S., Springsteel, F.N. et al. Alternative methods for the reconstruction of trees from their traversals. BIT 27, 133–140 (1987). https://doi.org/10.1007/BF01934177
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01934177