Archives for Sunday, February 24, 2019

February 2019 (5)
SMTWTFS
« Jan Mar »
12
3456789
10111213141516
17181920212223
2425262728

Like this Archive Calendar widget? Download it here.


Priority queues – part two

Last time, we introduced the concept of a priority queue data structure, and illustrated it with a couple of simple implementations using an array: firstly by adding new items at the end, and then getting the highest priority item by searching through the array; secondly by maintaining the array in sorted order by priority, forcing new items to be inserted in the correct position in the array, and getting an item is merely removing it from the end of the array. I called these fast insertion/slow deletion and slow insertion/fast deletion implementations. […]

READ MORE