[理工] [DS]-95台大-資工所
《資料結構》 洪逸 P.9-74
Which of the following is true about the heap data structure ? n is node num.
(a)Deleting the minimum element in a min-heap takes O(logn) time
(b)Finding the minimum element in a min-heap takes O(logn) time
(c)Inserting a node into a Fin. heap takes O(logn) time
(d)Decrease-key operation on a node of a Fib. heap takes O(1) time
(e)Finding both the monimum and the maximum elements in a min-max heap
takes O(1) time
答案是給(A)(C)(D)(E),
可是我覺得答案有點問題,
(B)應該是O(1)
(C)應該是O(1)
(D)應該是O(logn)
答案是(A)(E)?
請指教..感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.57.78.8
※ 編輯: assassin88 來自: 61.57.78.8 (01/15 00:25)
推
01/15 01:37, , 1F
01/15 01:37, 1F
→
01/15 01:38, , 2F
01/15 01:38, 2F
→
01/15 12:00, , 3F
01/15 12:00, 3F
→
01/15 12:01, , 4F
01/15 12:01, 4F
推
01/15 12:15, , 5F
01/15 12:15, 5F
→
01/15 12:16, , 6F
01/15 12:16, 6F