作者nonagoner (哈)
看板Grad-ProbAsk
标题[理工] [资结]-二元树追踪
时间Fri Feb 5 21:39:18 2010
If the inorder traversal of T yields GOODBOOK, and the postorder
traversal of T yields GOOOBKOD.
What is the preorder traversal of T?
我算出有2颗树,请问有没有问题呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.116.141.106
1F:推 tureday:我画的是 D 02/05 21:57
2F:推 lovefo:前(後)序 + 中序 不是可以决定唯一树吗? 02/05 21:57
3F:→ tureday: / \ 02/05 21:58
4F:→ tureday: O O 02/05 21:58
5F:→ tureday: / \ / \ 02/05 21:59
6F:→ tureday: G O B K 02/05 22:00
7F:→ tureday: \ 02/05 22:00
8F:→ tureday: O 就像l大说的可以决定唯一 02/05 22:01
9F:→ taitin:被断头XD 2F 在distinct的时候才唯一 02/05 22:02
10F:推 tureday:哎呀 我搞错了... 02/05 22:05