Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
3. Let Q be a capacity-limited list of FIFO queues. In other words, Q has
a top-level list of sub-queues. As new elements gets added to Q, we
add them to the first available sub-queue. We always extract the first
element in the first sub-queue. When that queue reaches a maximum
capacity c, we create a new queue and add the elements to this new
sub-queue instead. When we extract an element, we have to move
the the elements between the different sub-queues so that each sub-
queue except the last one remains filled to capacity. When a sub-queue
becomes empty, we delete it.