Revise MyPriorityQueue in Listing 24.9, using a generic parameter for comparing objects. Define a new constructor with

Question:

Revise MyPriorityQueue in Listing 24.9, using a generic parameter for comparing objects. Define a new constructor with a Comparator as its argument as follows:PriorityQueue(Comparator comparator)

Listing

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: