From charlesreid1

(Created page with "Priority queues, like Queues, are data collections that add items to the back and remove items from the front - a first-in, first-out container. However, priority queues k...")
 
No edit summary
 
Line 1: Line 1:
Priority queues, like [[Queues]], are data collections that add items to the back and remove items from the front - a first-in, first-out container. However, priority queues keep items inside the queue in a sorted order.
Priority queues, like [[Queues]], are data collections that add items to the back and remove items from the front - a first-in, first-out container. However, priority queues attach a key to each value in the queue, and sorts items in the queue by key. This allows different items to be processed with different priorities.

Latest revision as of 17:53, 19 June 2017

Priority queues, like Queues, are data collections that add items to the back and remove items from the front - a first-in, first-out container. However, priority queues attach a key to each value in the queue, and sorts items in the queue by key. This allows different items to be processed with different priorities.