作者taitin (小南)
看板Grad-ProbAsk
标题Re: [理工] [资结]-二元树追踪
时间Fri Feb 5 22:00:55 2010
※ 引述《nonagoner (哈)》之铭言:
: If the inorder traversal of T yields GOODBOOK, and the postorder
: traversal of T yields GOOOBKOD.
: What is the preorder traversal of T?
: 我算出有2颗树,请问有没有问题呢?
D
/ \
O O
/ \ / \
G O B K
/
O
D
/ \
O O
/ / \
O B K
/ /
G O
这样?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.230.227.76
※ 编辑: taitin 来自: 61.230.227.76 (02/05 22:03)
1F:推 tureday:最底下的O应该要接在B的右边 02/05 22:09
2F:推 nonagoner:黑阿 但O在B右点 这样是2颗树对後 02/05 22:16
3F:→ tureday:嗯 这样就有两棵了 感谢taitin同学 02/05 22:25
4F:→ nonagoner:感谢回答~ 02/05 22:28
5F:→ polomoss:借问:如果题目用Jan Feb月份当node建AVL Tree 02/05 23:13
6F:→ polomoss:排序大小是用月份1~12区分,还是英文字母第一个字? 02/05 23:14
7F:→ ianwuzack:英文字母 02/05 23:23