文件名称:HeapsortCodes
- 所属分类:
- 人工智能/神经网络/遗传算法
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 192kb
- 下载次数:
- 0次
- 提 供 者:
- 黃**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Heapsort
1.A heap is a binary tree satisfying the followingconditions:
-This tree is completely balanced.
-If the height of this binary tree is h, then leaves can be at level h or level h-1.
-All leaves at level h are as far to the left as possible.
-The data associated with all descendants of a node are smaller than the datum associated with this node.
Implementation
1.using a linear array not a binary tree.
-The sons of A(h) are A(2h) and A(2h+1).
2.time complexity: O(n log n)
1.A heap is a binary tree satisfying the followingconditions:
-This tree is completely balanced.
-If the height of this binary tree is h, then leaves can be at level h or level h-1.
-All leaves at level h are as far to the left as possible.
-The data associated with all descendants of a node are smaller than the datum associated with this node.
Implementation
1.using a linear array not a binary tree.
-The sons of A(h) are A(2h) and A(2h+1).
2.time complexity: O(n log n)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
HeapsortCodes
.............\HeapsortCodes.cpp
.............\HeapsortCodes.exe
.............\HeapsortCodes.cpp
.............\HeapsortCodes.exe