construct a tree using postorder and preorder.txt
来自「It is an ebook about trees」· 文本 代码 · 共 34 行
TXT
34 行
Can you construct a tree using postorder and preorder traversal?
Discuss it!
No
Consider 2 trees below
Tree1
a
b
Tree 2
a
b
preorder = ab
postorder = ba
Preorder and postorder do not uniquely define a binary tree. Nor do preorder and level order (same example). Nor do postorder and level order.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?