What is a priority queue?



What is a priority queue?..

Answer / Siddharth Lohani

A Priority Queue is a data structure that stores elements in such a way that they can be retrieved in order of some priority, with the highest (or lowest) priority item being retrieved first. It follows a principle known as the "first-in-first-out" (FIFO) or "last-in-first-out" (LIFO) principle based on the priority assigned to each element.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Is list same as array?

1 Answers  


Does arraylist allow null values?

1 Answers  


Is heap sort stable?

1 Answers  


What is a matrix? Explain its uses with an example

1 Answers  


What is a minimum spanning tree?

1 Answers  


What is a directed graph?

1 Answers  


Can arraylist hold duplicates?

1 Answers  


How will you reverse Linked List.

1 Answers  


What are the applications of priority queues?

1 Answers  


What is the advantage of the heap over a stack?

1 Answers  


Define primary data structures?

1 Answers  


Define non linear data structure.

1 Answers  


Categories