看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《alex817 (艾力斯)》之銘言: : 題目如下 : Draw a tree that is both complete binary search tree and a complete : binary tree with exactly 11 nodes. : Use keys from the integers 1 through 11 (each appearing exactly once) : 想請問大家 : 題目在講畫1顆樹從1到11要滿足二元完整樹和二元搜尋樹 : 但用紅黑樹和AVL樹畫也無法滿足此題目 : 請問是要用什麼方法解呢?? : 非常感謝大家! 不知道我理解有沒有錯誤 這應該是要找key value的順序吧? 8, 4, 10, 2, 6, 9, 11, 1, 3, 5, 7 8 4 10 2 6 9 11 1 3 5 7 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.228.28.238
juan19283746:4 5 8 9 順序是不是打錯了 09/26 22:54
感謝指證 ※ 編輯: mqazz1 來自: 61.228.28.238 (09/26 23:05)
juan19283746:不會 09/26 23:17
alex817:原來如此,我想的太複雜了,感謝! 09/26 23:54