Task prioritization determines which task should be handled next when available work has different levels of urgency or importance. It replaces a fixed arrival order with a decision rule: assign each task a priority, then select the highest-priority task whenever capacity becomes available. section 2.2 section 2.4.2
A bug tracker makes the constraints concrete. Developers are limited, new bugs appear continuously, and existing priorities can change. Sorting once is therefore insufficient; the structure must support repeated insertion, selection, and reprioritization. A bug can be represented with a priority such as severity or the number of days until it must be solved. section 2.2.1
Bug severity determines the next task
Given bugs with severities from 1 to 10, a priority ordering can return “UI breaks on browser X” before “Page loads take 2+ seconds.” Adding an unencrypted-password bug with severity 10 changes the next selection without requiring the entire task list to remain statically sorted. section 2.2.1
A priority queue implements this behavior, commonly with a heap. The heap keeps the highest-priority element at the top while imposing only the ordering required by its heap invariant. A general implementation can accept a priority function; a specialized task heap can instead store tuples such as (priority, task) and use tuple ordering. Larger values define a max-heap, while smaller values define a min-heap. Reversing the priority convention or taking reciprocals converts one interpretation into the other. section 2.5.4 section 2.4.2
Use the severity table to compare task descriptions with assigned priorities before examining the resulting priority order. section 2.2.1




