2009•Journal of Hengshui UniversityRequires access

Non-recursive Algorithm Which Constructs The Binary Tree With Traversal Sequence

Lu Liu

Open publisher page 1 citations

Abstract

There are many methods to construct a binary tree.Provide the node sequences of a inorder traversal and postorder traversal,then a binary tree can be constructed.Recursive algorithm is usually used.A recursive algorithm structure is simple,clear and readable.But a recursive algorithm will cost too much time and space during the process.We should transform the recursive algorithm into a non-recursive algorithm for time and space efficiency.A non-recursive algorithm is given,which inputs the node sequences of a binary tree for inorder traversal and postorder traversal and constructs the binary tree.The algorithm is optimal for the problem with time complexity O(n),where n is the number of the nodes of the tree.

About this research paper

What this paper is about

There are many methods to construct a binary tree.Provide the node sequences of a inorder traversal and postorder traversal,then a binary tree can be constructed.Recursive algorithm is usually used.A recursive algorithm structure is simple,clear and readable.But a recursive algorithm will cost too much time and space during the process.We should transform the recursive algorithm into a non-recursive algorithm for time and space efficiency.A non-recursive algorithm is given,which inputs the node sequences of a binary tree for inorder traversal and postorder traversal and constructs the binary tree.The algorithm is optimal for the problem with time complexity O(n),where n is the number of the nodes of the tree.

Why it matters

OpenAlex reports 1 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

There are many methods to construct a binary tree.Provide the node sequences of a inorder traversal and postorder traversal,then a binary tree can be constructed.Recursive algorithm is usually used.A recursive algorithm structure is simple,clear and readable.But a recursive algorithm will cost too much time and space during the process.We should transform the recursive algorithm into a non-recursive algorithm for time and space efficiency.A non-recursive algorithm is given,which inputs the node sequences of a binary tree for inorder traversal and postorder traversal and constructs the binary tree.The algorithm is optimal for the problem with time complexity O(n),where n is the number of the nodes of the tree.

Key concepts: Tree traversal, Binary tree, Optimal binary search tree, Algorithm, Tree (set theory), Computer science, Node (physics), Binary search tree

Related papers

Back to paper searchBrowse research topicsOriginal source
Non-recursive Algorithm Which Constructs The Binary Tree With Traversal Sequence — Research Paper | ScholarLens