Implement a Priority Queue of names such that alphabetically smaller names are always the first ones to be dequeued. Take five to ten random names from the user and insert them in queue in order. Then call the dequeue function multiple times to obtain alphabetically smaller names from queue and print them.
in c++ programming.
Answers
Answered by
0
Priority Queue | Set 1 (Introduction)
Priority Queue is an extension of queue with following properties.
Every item has a priority associated with it.
An element with high priority is dequeued before an element with low priority.
If two elements have the same priority, they are served according to their order in the queue.
HOPE THIS HELPS YOU
Similar questions