看板 Grad-ProbAsk 關於我們 聯絡資訊
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
tureday:我畫的是 D 02/05 21:57
lovefo:前(後)序 + 中序 不是可以決定唯一樹嗎? 02/05 21:57
tureday: / \ 02/05 21:58
tureday: O O 02/05 21:58
tureday: / \ / \ 02/05 21:59
tureday: G O B K 02/05 22:00
tureday: \ 02/05 22:00
tureday: O 就像l大說的可以決定唯一 02/05 22:01
taitin:被斷頭XD 2F 在distinct的時候才唯一 02/05 22:02
tureday:哎呀 我搞錯了... 02/05 22:05