May 2017
Intermediate to advanced
340 pages
8h 16m
English
The unordered sequence does not require us to go through each queue element in order to place the newly added element. It is always added to the rear as a general queue principle. As a result, we can achieve the enqueue operation with O(1) complexity. But if we want to find or remove the highest priority element, then we have to go through each element to find the right one. As a result, it is not very search-friendly.
Now we are going to write code to implement the priority queue using an ordered sequence with a linked list.
Read now
Unlock full access