formatting source-code for 91c9c96cf4

This commit is contained in:
github-actions 2020-06-23 19:29:12 +00:00
parent 91c9c96cf4
commit 6882b545c7

View File

@ -13,13 +13,13 @@ class MinHeap {
int heap_size; ///< Current number of elements in min heap
public:
/** Constructor: Builds a heap from a given array a[] of given size
/** Constructor: Builds a heap from a given array a[] of given size
* \param[in] capacity initial heap capacity
*/
explicit MinHeap(int cap) {
heap_size = 0;
capacity = cap;
harr = new int[cap];
heap_size = 0;
capacity = cap;
harr = new int[cap];
}
/** to heapify a subtree with the root at given index
@ -49,12 +49,9 @@ class MinHeap {
/** Inserts a new key 'k' */
void insertKey(int k);
~MinHeap() {
delete [] harr;
}
~MinHeap() { delete[] harr; }
};
// Inserts a new key 'k'
void MinHeap::insertKey(int k) {
if (heap_size == capacity) {