📜  门| GATE-CS-2017(套装2)|第 45 题

📅  最后修改于: 2021-09-26 04:36:48             🧑  作者: Mango

二叉搜索树的前序遍历由 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20 给出。
那么这棵树的后序遍历是:
(一) 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20
(乙) 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12

(C) 7, 2, 6, 8, 9, 10, 20, 17, 19, 15, 16, 12

(四) 7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12答案:(乙)
解释:从前序画二叉搜索树,然后写后序。

q_35
这个问题的测验