堆的节点总数n和叶结点数目的关系 (CLRS习题 6.1-7)
来自算法导论 CLRS的一个习题。Chapter 6 Heap Sort. Exercise6.1-7
Show that, with the array representationfor storing an n-element heap, the leaves are the nodes indexed by ⌊n/2⌋ + 1, ⌊n/2⌋ + 2, . . . , n.
转载
2014-05-17 17:16:16 ·
1364 阅读 ·
0 评论