作者mimi9126 (煩呀)
看板b98902HW
標題[計程] pre/post-order traversal
時間Thu Dec 17 21:21:48 2009
今天講的有一點錯誤
給定binary tree的pre-order和post-order presentation以後,還是有可能有
multiple solution,就是如果像這種
pre: ab
post: ba
那這顆tree的root是a沒有疑問,但b有可能是a的左子樹也可能是右子樹
是要給in-order,和pre-order或是pre-order其中一個才能唯一決定
--
We know. The time of joy will pass again someday.
Then, fresh wind blows. It treasures that is happy.
too, to be sad, too. Let's repeat it eternally, and live, and go!!
maybe happy...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.218.141
1F:推 s864372002:"pre-order或pre-order" ||| 12/17 21:52
2F:推 s864372002:若計算樹的話只要pre-order或post-order其一即可ˊˇˋ 12/17 21:53
3F:→ mimi9126:阿看得懂就好啦=皿= 12/17 23:34