在数据结构中,已知一棵二叉树的先序序列和中序序列,可唯一确定此二叉树。
In the data structure, the binary tree can be uniquely confirmed when the nodes sequences of this binary tree for preorder traversal and inorder traversal are knows.
但是不同的二叉树的先序遍历序列或中序遍历序列或后序遍历序列有可能是相同的。
The pre order, in order and post order traversal of every binary tree are unique, but those of different binary trees may be identical.
先序遍历是序列化二叉树的方式之一。
One way to serialize a binary tree is to use pre-oder traversal.
应用推荐