04. 二叉树的还原知识 #34
utterances-bot
started this conversation in
Comments
Replies: 4 comments
-
这个二叉树的还原是不是应该是完全二叉树才行 |
Beta Was this translation helpful? Give feedback.
0 replies
-
不需要,普通二叉树也可以的。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
如果想仅通过前序遍历,或者后序遍历还原一颗二叉树也是可以的。前提条件是空节点,也就是叶子节点的null子节点也要序列化下来 |
Beta Was this translation helpful? Give feedback.
0 replies
-
3.2 node右子树是否应该改为 node.right = createTree(inorder[k + 1: n], postorder[n - k - 1: n - 1], n - k - 1) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
04.二叉树的还原知识 | 算法通关手册
二叉树的还原知识 # 1. 二叉树的还原简介 # 二叉树的还原:指的是通过二叉树的遍历序列,还原出对应的二叉树。 从二叉树的遍历过程可以看出,给定一棵非空
https://algo.itcharge.cn/07.Tree/01.Binary-Tree/04.Binary-Tree-Reduction/
Beta Was this translation helpful? Give feedback.
All reactions