As an example of a priority queue, let's present a simple approach to the call center example, where there are many callers (with different client identifiers), and only one consultant, who answers waiting calls, first from the priority queue and then from the clients with the standard support plan.
The afore mentioned scenario is presented in the following diagram. Calls with the standard priority are marked with -, while calls with priority support are indicated by *, as shown as follows:
Let's take a look at the order of elements in the priority queue. Currently, it contains only three elements, ...