Top "Priority-queue" questions

A priority queue is a regular queue or stack data structure, but where additionally each element has a "priority" associated with it.

Java Priority Queue with a custom anonymous comparator

Forgive me if this is a tried question, but I'm having a little difficulty figuring it out. I currently have …

java priority-queue
How to configure Java Priority Queue to ignore duplicates?

I thought add() is supposed to ignore duplicates, but my output has duplicates. How do I not store duplicates? I …

java collections priority-queue
Efficient way to implement Priority Queue in Javascript?

Priority Queues have a priority value and data, for every entry. Thus, when adding a new element to the queue, …

javascript priority-queue
Dijkstra algorithm with min-priority queue

I'm trying to implement the dijkstra algorithm with priority queue, but I can't understand how it works. I read many …

graph path priority-queue dijkstra shortest-path
Why does Dijkstra's algorithm use decrease-key?

Dijkstra's algorithm was taught to me was as follows while pqueue is not empty: distance, node = pqueue.delete_min() if …

algorithm data-structures priority-queue graph-algorithm dijkstra
Is there an alternative to Dictionary/SortedList that allows duplicates?

Possible Duplicate: C# Sortable collection which allows duplicate keys Basically I'd like to make a Dictionary work with duplicate keys …

.net dictionary priority-queue multimap
PriorityQueue/Heap Update

Does Java have an easy way to reevaluate a heap once the priority of an object in a PriorityQueue has …

java heap priority-queue
Is there a PriorityQueue implementation with fixed capacity and custom comparator?

Related questions: Java PriorityQueue with fixed size How do I use a PriorityQueue? get indexes of n smallest elements in …

java scala heap priority-queue
Difference between std::set and std::priority_queue

Since both std::priority_queue and std::set (and std::multiset) are data containers that store elements and allow you …

c++ algorithm sorting priority-queue
How to update elements within a heap? (priority queue)

When using a min/max-heap algorithm, priorities may change. One way to handle this is to removal and insert the …

algorithm priority-queue insert-update min-heap