Given preorder and inorder traversal of a tree, construct the binary tree.
给定一个二叉树的前序和中序遍历,重建这棵二叉树。
Given preorder and inorder traversal of a tree, construct the binary tree.
给定先序和中序遍历,构造二叉树。
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.
在数据结构中,已知一棵二叉树的先序序列和中序序列,可唯一确定此二叉树。
Binary tree operation: create a binary tree, before traversing binary, inorder, postorder binary tree traversal.
说明:二叉树操作:建立二叉树,前序遍历二叉树、中序、后序遍历二叉树。
Binary tree operation: create a binary tree, before traversing binary, inorder, postorder binary tree traversal.
说明:二叉树操作:建立二叉树,前序遍历二叉树、中序、后序遍历二叉树。
应用推荐