Question: (15 points) Priority Queue 1) points) Suppose we use the following comparator for a PQ- Alg Compare (S., S.) * >k: return 1; Then we

 (15 points) Priority Queue 1) points) Suppose we use the following

(15 points) Priority Queue 1) points) Suppose we use the following comparator for a PQ- Alg Compare (S., S.) * >k: return 1; Then we performed 3 inserts: insert("Amy", A), insert(Mike, B), insert("Cathy", C) a. What is the output data of the first removeMin(): b. What is the output data of the second removeMino: c. What is the output data of the third removeMino: 2) points) Now assume we use a slightly different comparator for another PQ Alg Compare (S., S.) kl k; return -1; Then we performed 3 inserts to this new PQ: insert(Amy, A), insert("Mike", B), insert("Cathy", C) What is the output data of the first removeMin(): b. What is the output data of the second removeMino: c. What is the output data of the third removeMin()

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!