摘要: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2020-01-17 19:49 SteveYu 阅读(177) 评论(0) 推荐(0) 编辑
摘要: In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the 阅读全文
posted @ 2020-01-17 18:53 SteveYu 阅读(124) 评论(0) 推荐(0) 编辑
摘要: ``` typedef struct HNode *Heap; /* 堆的类型定义 */ struct HNode { ElementType *Data; /* 存储元素的数组 */ int Size; /* 堆中当前元素个数 */ int Capacity; /* 堆的最大容量 */ }; typedef Heap MaxHeap; /* 最大堆 */ typedef Heap MinHeap 阅读全文
posted @ 2020-01-17 17:07 SteveYu 阅读(249) 评论(0) 推荐(0) 编辑