Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
给出树的前序和中序遍历序列,构造二叉树,假设树唯一存在。
剑指offer面试题6,重建二叉树
时间: 2024-12-22 19:07:01
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
给出树的前序和中序遍历序列,构造二叉树,假设树唯一存在。
剑指offer面试题6,重建二叉树