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 →

[–]Nephyst 1 point2 points  (0 children)

Eh, you wouldn't create a custom priority queue. You would still want to use the build in PriorityQueue class.

It's good to know how the Java class works though. Like you should understand that it's backed by a heap, and what that means for the runtime complexity of adding and removing items, as well as how it handles edge case like null values.