Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (6.5k points)
I understand what Queues are. But what does a priority queue mean, exactly?

1 Answer

0 votes
by (11.3k points)

In the context of JAVA, the LinkedList class has been optimized to implement queues as an interface. Like arrays, Queues can be structured with linked-lists as well. The goal of the queue is the provide a "priority-in, priority-out" data structure. This is why the elements of the queue are either naturally ordered or are ordered by the comparator. This order is what determines their priority. 

Try to make project which used the priority queue with the help of a java tutorial to understand the concept better. 

Related questions

0 votes
1 answer
asked Feb 19, 2020 in Java by angadmishra (6.5k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)

Browse Categories

...