heap.h
#ifndef HEAP_H#define HEAP_H #include <vector>class Heap{
public:
Heap(std::vector<int> &);//Constructor functionvoid Insert(int );//Insert a value into heapvoid Delete(int );//Delete a value from heap,if can't find the value in heap,do nothingint Max();//Return the maximum value if heapvoid Ext_Max();//Delete the maximum value in heapstd::vector<int> Heap_Sort();//Return the sorted value of heap,BUT the value in heap didn't changeprivate:
void Max_Heapify(int );//Fix the heap from top to bottom form a positionint Find(int,int);//Find the value from a position,return the position ,if can't find return -1std::vector<int > data;
int len=0;
};
#endif