P68 - 二叉树的中序和前序序列
In-order and pre-order sequences
官方模块:
Problems.P68核心函数:inorder / preorder / ordersToTree
← P67 二叉树的字符串表示 | P69 二叉树的点串表示 →
← P67 二叉树的字符串表示 | P69 二叉树的点串表示 →
题目描述
根据二叉树的中序和前序遍历序列重建二叉树。
函数签名
思路
实现
测试
1-- >>>
In-order and pre-order sequences
官方模块:
Problems.P68核心函数:inorder / preorder / ordersToTree
← P67 二叉树的字符串表示 | P69 二叉树的点串表示 →
← P67 二叉树的字符串表示 | P69 二叉树的点串表示 →
根据二叉树的中序和前序遍历序列重建二叉树。
1-- >>>