Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

PREPRINT. Information Processing Letters, 34(1):2125, 1990. Construction of a Tree from its Traversals in

Summary: PREPRINT. Information Processing Letters, 34(1):21­25, 1990.
Construction of a Tree from its Traversals in
Optimal Time and Space \Lambda
Arne Andersson Svante Carlsson
Department of Computer Science
Lund University
Lund, Sweden
Given the preorder traversal of a tree together with some additional
structure information, the tree can be constructed in linear time with
a simple algorithm. The additional information may be the inorder or
postorder traversal. In one case, the binary search tree, no additional
information is required. We also show how to transform the construc­
tion algorithm into a non­recursive algorithm requiring only constant
Keywords: Analysis of algorithms, data structures, binary tree, multiway
tree, binary search tree, tree traversal, tree construction
1 Introduction
The problem of constructing a binary tree from its preorder and inorder
traversals is well known. Lately Burgdorff et. al. [2] gave a non­recursive


Source: Andersson, Arne - Department of Information Technology, Uppsala Universitet


Collections: Computer Technologies and Information Sciences