Question: Using C++ language This lab exercises your understanding of using a Heap to create a Priority Queue Follow these steps: 1) Call your source code

Using C++ language

Using C++ language This lab exercises your understanding of using a Heap

This lab exercises your understanding of using a Heap to create a Priority Queue Follow these steps: 1) Call your source code file "lab4.cpp 2) Declare an integer array to use for the heap (size of 20 to 30 elements) 3) Create an insertion function (and any needed helper functions) that creates a min-heap (smallest priority is most important) 4) Create a remove function (and any needed helper functions) that removes the min value from the heap and returns it 5) In main, call the insertion function with at least 15 random values In main, call the remove function for all values and print them to the screen (format the numbers so they all fit in a single screen perhaps 5 to 10 columns before pressing enter?) 6) 7) Repeat the insertion and remove/print for a second set of random values before ending the programm

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!