Aryan PrajapatKnowledge Contributor
What is a priority queue? What are the applications for priority queue?
What is a priority queue? What are the applications for priority queue?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
Priority Queue is an abstract data type that is similar to a queue in that each element is assigned a priority value. The order in which elements in a priority queue are served is determined by their priority (i.e., the order in which they are removed). If the elements have the same priority, they are served in the order they appear in the queue.
Following are some real-time applications for priority queue:
Used in graph algorithms like Dijkstra, Prim’s Minimum spanning tree etc.
Huffman code for data compression
Finding Kth Largest/Smallest element