Re: [問題] 資結-是非題..

看板Grad-ProbAsk作者 (F‧R‧I‧E‧N‧D‧S)時間17年前 (2009/04/05 09:12), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/3 (看更多)
※ 引述《bernachom (Terry)》之銘言: : 1. For a complete binary tre represented in memory as an array,if there is : a node at index 4i+3 it must be a child of a child (grandchild) of the : node at i. i / \ 2i 2i+1 / \ / \ 4i 4i+1 4i+2 4i+3 : 2. Searching for a key in a heap takes worst-case time O(n). 事實上任何key值的search 最差就是O(n)了 -> 將所有key值都測試過 : 解答寫: 1.T 2.T : 第一題我不太清楚... : 第二題最差的case 不是應該為nlogn才是嗎? : 謝謝 -- 做一點自己能做的事 http://www.wretch.cc/blog/showyincs/68854 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.117.20.95 ※ 編輯: ixjnpns 來自: 122.117.20.95 (04/05 09:14)

04/05 14:09, , 1F
謝謝您,我知道了
04/05 14:09, 1F
文章代碼(AID): #19s0LpPn (Grad-ProbAsk)
文章代碼(AID): #19s0LpPn (Grad-ProbAsk)