摘要: 本段代码实现了建堆,维护最大堆的性质,堆排序函数,优先队列的相关函数(插入,找最大值,提取出最大值,增加关键值,增加元素),以及相关的测试 #include #include #include #define LEFT(i) (2 * i)#define RIGHT(i) (2*i + 1)#de... 阅读全文
posted @ 2015-04-06 22:44 小鸭子在蓝鲸 阅读(257) 评论(0) 推荐(0)