9.3 Heaps 3. member function of MaxHeap 1)constructor for MaxHeap template<class t> MaxHeap<t> MaxHeap(int MaxHeapSize MaxSize=MaxHeap Size Heap=new t[MaxSize+1 Currentsize=0
9.3 Heaps 3.member function of MaxHeap 1)constructor for MaxHeap template<class T> MaxHeap<T>::MaxHeap(int MaxHeapSize) { MaxSize=MaxHeapSize; Heap=new T[MaxSize+1]; CurrentSize=0; }
9.3 Heaps 2 )Insertion into a max heap Example Insert 2 14)①10
9.3 Heaps 2)Insertion into a max heap Example: 20 15 2 14 10 14 10 2 20 21 15 Insert 21