给定先序和中序遍历,构造二叉树。
Given preorder and inorder traversal of a tree, construct the binary tree.
先序遍历是序列化二叉树的方式之一。
One way to serialize a binary tree is to use pre-oder traversal.
在数据结构中,已知一棵二叉树的先序序列和中序序列,可唯一确定此二叉树。
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.
应用推荐