1 .大顶堆的数据结构

//最大堆的数据结构
typedef struct MaxHeap{
int *Element; //实际存储元素
int size; //已使用大小
int cap; //容量
}MaxHeap,*Heap_idx;

2.相关函数说明

创建堆函数:void Creat_Heap(Heap_idx &h);
压入一个数据x函数:int Push(Heap_idx h,int x);
移出数据函数:int Pop(Heap_idx h,int &x);
调整函数:int Modify(Heap_idx h);

3.测试图

大顶堆的实现报告

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-07-31
  • 2021-11-21
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
相关资源
相似解决方案