Neocortex 🧠

Search

Search IconIcon to open search

Priority Queue

Last updated Dec 14, 2021 Edit Source

Priority queues are data types similar to regular Queues, except that they are not a FIFO data structure. Instead, each element in a priority queue has a key and a value. The elements are outputted using the key in the order that the element with the lowest key is outputted first. Even though keys are often thought to be integers, they can be any type of data thanks to the Comparables and Comparators in java.


Interactive Graph