Priority Queue Applications

What are the computer applications of the priority queue data structure? I want to know about computer processes or computer applications that use priority queues. I know one such application. We can use the priority queue in printer buffers. For example, suppose there are 3 priority levels. The user must indicate his priority before issuing a print command. Thus, the document in the buffer with the highest priority will be printed first, etc.

So, any other applications of this kind?

+2
source share
3 answers

I just wanted to give this in the form of an answer, to make sure that you see it. Some uses are described in detail at http://en.wikipedia.org/wiki/Priority_Queue#Applications . This includes control and tracking algorithms.

0
source

As an example of using the priority queue, check out my series of search messages A * (A star). It contains an implementation of source code in C #.

In order for the A * algorithm to work, we need to get the method with the lowest estimate-cost-path-so-far found from the list of paths under consideration. The standard data structure for this is the Priority Queue. Priority queues are called this because they are usually used to store a list of tasks, where each task has a priority associated with it.

Take a look at my blog posts to see the priority queue in action:

0
source

Source: https://habr.com/ru/post/1502181/


All Articles