算法导论 第六章 堆排序.pptVIP

  • 13
  • 0
  • 约5.11千字
  • 约 26页
  • 2017-06-23 发布于河南
  • 举报
算法导论 第六章 堆排序

Heap sorting(堆排序) 主要内容 Overview Heap堆 Heap:a data structure which is an array object that can be viewed as a complete binary tree(完全二叉树) Describe storage堆的表示和存储 An array A that represents a heap is an object with two attributes: Length[A]----the number of elements in the arry A (数组A长度) Heap-size[A]----the number of elements in the heap stored within array A (存储在A中堆的元素个数) Heap-size[A] ≤Length[A] 大根堆、小根堆 There are two kinds of binary heaps: Max-heap Min-heap Max-heap----for every node i other than the root, A[PARENT(i)] ≥A[i] Min-heap----for every node i other than the root,

文档评论(0)

1亿VIP精品文档

相关文档