[理工] [資結] tree兩題疑問

看板Grad-ProbAsk作者 (panda)時間12年前 (2012/06/28 20:01), 編輯推噓1(102)
留言3則, 1人參與, 最新討論串1/1
以下兩個問題想請教如下: 1. Consider a binary tree T. The maximum number of nodes on level k is (2^k) - 1(level以1開始). The maximun number of nodes in T of level k is 2^(k-1) . 因此對於任何一個有n個nodes的binary tree T 而言, 它的高度為大寫omega(nlogn). 這是97年成大資管乙的題目,這題答案是true,但是我感到怪怪的,因為n個nodes的 Binary tree最大高度不是才n嗎,怎麼會是題目所說的至少是nlogn呢? -- 2. Without comparing keys in a BST , we cannot determine both the successor and predecessor of a node. 這題是98年成大資管的題目,這題是false,但我也很不確定,我認為錯的原因,因為可 以拿inorder traversal作為反例,不知道題目是不是要問這個呢? 謝謝大家 -- 標題 [問卦] 男女生小時候最愛看的卡通的八卦? 時間 Mon Jun 18 01:34:21 2012 --

06/18 01:36,
你屁 我是女生 我也愛看閃電霹靂車 你這智障
06/18 01:36
婀 妳好兇喔 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.237.24 ※ 編輯: vinny200277 來自: 220.135.237.24 (06/28 20:04)

06/28 23:38, , 1F
第一題應該題目錯,若是洪兔課本的答案,就更確定了XD,
06/28 23:38, 1F

06/28 23:41, , 2F
若要true,除非nlogn改成n,不然就omega改big o,出版商真
06/28 23:41, 2F

06/28 23:41, , 3F
用心~
06/28 23:41, 3F
文章代碼(AID): #1Fx4UUAO (Grad-ProbAsk)