[問題] 資結-是非題..
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.
2. Searching for a key in a heap takes worst-case time O(n).
解答寫: 1.T 2.T
第一題我不太清楚...
第二題最差的case 不是應該為nlogn才是嗎?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.99.70
推
04/05 09:08, , 1F
04/05 09:08, 1F
→
04/05 09:09, , 2F
04/05 09:09, 2F
→
04/05 09:09, , 3F
04/05 09:09, 3F
→
04/05 09:10, , 4F
04/05 09:10, 4F
推
04/05 09:12, , 5F
04/05 09:12, 5F
討論串 (同標題文章)