Questions tagged [priority-queue]

Priority queues are dynamic sets that always remove highest priority elements first.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
1k views

Fibonacci heap in Python

I have this implementation of the Fibonacci heap in Python: ...
2
votes
0answers
74 views

An ISeq implementing Priority Queue

This is a follow up to my last review request. I made three major changes: I had it fully implement ISeq and IPersistentStack, ...
2
votes
0answers
65 views

A Priority Queue implemented using a Linked List

I'm going to write a Huffman Coding implementation, and decided to write from scratch a priority queue to help out. I've never written a priority queue before, in any language, so this was interesting....
2
votes
0answers
536 views

Priority queue with updatable values

I'm writing a priority queue that stores a bunch of data with a value attached to the data, with \$O(1)\$ access to the data with the smallest value attached to it. I also need to be able to update ...
2
votes
0answers
437 views

Min-Heap based priority queue class written in ES6

I would appreciate any feedback on syntax, naming convention, possible shortcuts, clarity of code and any other constructive feedback. This code was based off of the Priority Queue chapter in The ...
1
vote
0answers
83 views

Sorted set a Queue

I needed a data structure offering both poll returning the smallest element and fast contains. A ...
1
vote
0answers
341 views

Efficient stable priority queue in Java

I have this stable priority queue. It runs all the operations within \$\mathcal{O}(\log P)\$, where \$P\$ is the number of distinct priority keys (which may be smaller than the number of elements ...
1
vote
0answers
88 views

Purely functional octree and octree priority queue

I'm programming a game in Scala, and a lot of tasks are able to be done in the background. I've created a system in which each Future can be assigned a position in 3d space, and they are stored in an ...
1
vote
0answers
534 views

Minimum Priority Queue using Heap

After getting suggestions for Maximum Priority Queue I have written program for Minimum Priority Queue. Help me improve this code. ...
1
vote
0answers
52 views

Glueing Java collections into a heap

I have implemented this heap (priority queue) data structure using java.util.TreeMap and java.util.ArrayDeque. The operations ...
1
vote
0answers
103 views

Generic implementation of mutable binary heap

std::priority_queue does not support dynamically updating element priorities. This class template extends it by allowing updating priorities of elements in the heap....
0
votes
0answers
94 views

Axios Resource Level Rate Limiter with Priority

I'm using multiple APIs with different rate limits and also do requests to non-rate-limited websites and I didn't want to handle multiple axios instances for each type. There are quite a few limiters ...
0
votes
0answers
22 views

Priority URL queue that does not block on put()

I am trying to build a priority queue that never blocks on put(), and discards the lowest priority item if it is full and user attempts to ...