The Algorithm Of Confirming a Binary Tree by Traversing the Sequence
-
Abstract
This paper proposed an approach to confirm a unique binary tree by traversal sequence.The approach is based on confirming a unique binary tree by two kinds of traversal sequences.The preorder traversal sequence and the inorder traversal sequence or the postorder traversal sequence and the inorder traversal sequence can confirm the only one binary tree.However,the postorder traversal sequence and the preorder traversal sequence cannot confirm the only one binary tree.The preorder traversal sequence and the postorder traversal sequence can confirm a unique binary tree whose degree is zero or two.The approach has been explained in this paper.The corresponding algorithm has been implemented in Turbo C.
-
-