Page 1 of 1

The following code contains functions to implement a Max-Heap using a partially filled array, Fill the body of all funct

Posted: Fri Apr 29, 2022 6:59 am
by answerhappygod
The Following Code Contains Functions To Implement A Max Heap Using A Partially Filled Array Fill The Body Of All Funct 1
The Following Code Contains Functions To Implement A Max Heap Using A Partially Filled Array Fill The Body Of All Funct 1 (34.38 KiB) Viewed 38 times
The following code contains functions to implement a Max-Heap using a partially filled array, Fill the body of all functions: #include<iostream> using namespace std; static const int MAX_SIZE = 15; int heap[MAX_SIZE); int size=0; // index of the parent static int parent(int i) { } // index of the left child static int leftChild(int i) { 3 // index of the right child static int rightChild(int i) { } // insert the item at the appropriate position void insert(int data) { } // returns the maximum item of the heap int getMax() { } // prints the heap void printHeap() { }