vincemansel/PQueue — Issue #4: PQueue: pqChunkList mis-queues a higher priority element.
Author: vincemansel
Created: 2011-10-21 20:21:57+00:00
State: open

The code is not splitting the current last overflow block into two blocks.
The fix is to create a new block, do an intelligent split putting lower contents of current block
into new block, thus making room for the higher priority value, then write the new value in
the now open element of the current block.

DeQ = PQueue::dequeueMax():first=9:last=9= 33
Size = 8:8
DeQ = PQueue::dequeueMax():first=10:last=9=
PQueue::dequeueMax(): deleting head = 22
Size = 7:7
DeQ = PQueue::dequeueMax():first=6:last=8= 34
Size = 6:6
DeQ = PQueue::dequeueMax():first=7:last=8= 32
Size = 5:5