Question: Please write code in C++ , have a screen shot for output would be great 1 Setting You are already provided with a binary heap,

 Please write code in C++ , have a screen shot for

Please write code in C++ , have a screen shot for output would be great

1 Setting You are already provided with a binary heap, that handles some operations. So far, there is code for "insert", "findMax", and "print". So you already have the code to construct the heap. The I/O format has been fixed. The input and output files are given as command line arguments. Each line of the input file is an operation on the binary heap. The "print" operation leads to printing the heap as an array) in the output file. For this test, you will have to implement one of the functions described below. You cannot store the heap in some other data structure. You must manipulate the heap directly to perform these functions. 1.1 The test questions There are only one operation that you need to study for the test. void extractMax(). This is just the standard extract maximum function in a binary heap. It would be useful to code up the heapify function as well. (You are only provided with the header declaration for extractMax.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!