Priority Queues in Java
Using priority queues to schedule work
I was recently reminded that Java has priority queues as part of its collections framework. A priority queue gets its name from one of its first usages, that of scheduling work in an operating system. It is a partially ordered list, which means that it doesn’t have to sort all the items, but only has to ensure that the least valued object is at the head…