Does PriorityQueue call sorted every time get is called?
Advertisements The docs for queue.PriorityQueue say: The lowest valued entries are retrieved first (the lowest valued entry is the one returned by sorted(list(entries))[0]). Does that mean that every time I use the get method of a PriorityQueue that the elements are re-sorted? That would seem inefficient. >Solution : That does not means that the elements… Read More Does PriorityQueue call sorted every time get is called?