Question: Provide an implementation of Priority Queue ADT using Binary Heaps. -Accept a list of numbers as input -Build a binary heap of the given elements
Provide an implementation of Priority Queue ADT using Binary Heaps.
-Accept a list of numbers as input
-Build a binary heap of the given elements
-Ask the user for the order of ascending or descending
-Output the proper ordering for the given list using Heap Sort
-Print the min and max values from the list (per users request)
-Extract min or max value (per users request)
-Modify values in the heap
-Add elements to the heap (per users request)
Output:

C++ thankyou.
The output screen would have the following general format while meeting the requirements outlined above: Enter 0 for ascending and 1 for descending order: 1 Input array: 4326// build_minHeap() Input element: 9 //insert_val_MinHeap() The sorted heap is: 96432 Calling extract_minimum: 2 The sorted heap is: 9643
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
