Sorting in a Priority Queue
-
05-11-2019 - |
Pergunta
Does a priority queue Queue<K,V>
always sort its elements based on the value of each element or its key?
I know than the priority in the queue is based on the key, and that the element with the highest priority has the minimal key (Correct me if I am wrong) But I am not sure about wether the pq sorts based on value.
Nenhuma solução correta
Licenciado em: CC-BY-SA com atribuição
Não afiliado a cs.stackexchange