Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If you just want to return the maximum element without deleting, then
if you also delete it, then nothing, because this contradicts the very structure of the prioritized queue.
If you need to have a reverse order of prioritization, then create wrappers that invert elements when inserting and deleting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question