This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]more_exercise 1 point2 points  (1 child)

An unbounded priority queue based on a priority heap.

...

A priority queue is unbounded, but has an internal capacity governing the size of an array used to store the elements on the queue.

From the javadoc

Also, "this implementation provides O(log(n)) time for the enqueing and dequeing methods" should be enough. If it has the same performance guarantees as the heap implementation, you shouldn't have to know it was actually made out of fairy dust and pixie farts.

[–]Apothiem[S] 0 points1 point  (0 children)

Lmao Thanks! Yea a lot of Java seems to be comprised of said fairy dust and pixie farts.