There are many reasons to use a priority queue For this disc

There are many reasons to use a priority queue. For this discussion question, find an example of a priority queue

Note: either use one from your work experience or research one.

Share & Explain the situation where your example is utilized.

Discuss why a priority queue benefits the users in this situation.

Solution

Priority queue are used as helper function in many of the algorithms along with popular data structure. Let\'s see a real life example of a priority queue.

Suppose you are going to a mall to watch a movie and there people are standing in a queue to buy a ticket. You go there and you have a membership card for that movie sponsor then you will get to enter in a special priority queue where you\'ll able to buy ticket without standing in a line. So, here guys with membership cards are getting priority over than normal guys.

Another example will be traffic light controller. We know, traffic light operates in periodic manner like x seconds for red, y seconds for green. But if there is priority transport like Ambulance, Police Van, Minister\'s Car etc. then this traffic light changes automatically from red to green interrupting their periodic schedule. That is based on the priority, traffic light change its behavior. This is really good example of priority queue as people in emergency (patients in ambulance) will get through easily.

There are many reasons to use a priority queue. For this discussion question, find an example of a priority queue Note: either use one from your work experience

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site