Welcome to Day 51 of the DSA Coding Challenge:
Todays Goals:
Question 1:Max Heap Construction
Write a max Heap Class that supports the following:
1.Building a Max heap from an input array
2.Inserting integers in the Heap
3.Removing the Heap’s maximum / root value
4.Peeking at the Heap’s maximum / root value
The Heap is to be represented in the form of an array.
Question 2:min Priority Queue Construction
Implement a Priority Queue as a min Binary Heap. The Priority Queue class should support the following functions
1.Enqueue to insert an element
2.Dequeue to extract the element with the highest priority ( lowest numerical priority is treated as highest priority)
All the best!