Question: A maximum heap is used to implement Priority Queue class. Please draw the maximum heap status when the following functions of the priority queue object

A maximum heap is used to implement Priority Queue class. Please draw the maximum heap status when the following functions of the priority queue object - pq, are called one by one: 1) pq.push(30); 2) pq.push(20); 3) pq.push(150); 4) pq.push (230); 5) pq.pop(); 6) pq.pop(); 7)pq.push(40); 8) pq.push(155); 9) pq.pop().

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!