Suppose I have a priority queue that deletes items in ascending order, and the items are stored in this queue 1, 1, 3, 0, 1. Incremental order 0, then 1, then 3, but there are three elements of 1s.
When I call remove, it will delete first 0, but if I call remove, it will delete all three again 1, or I will need to call removethree separate ones to delete all elements 1.
Does a call removein such a priority queue call all elements with the same minimum value, or is only one element deleted during each call?
source
share