previous | index | next

A Linked-List Queue Representation

Enlarging the queue "on the fly" has the same drawbacks as for stacks: it takes time and might waste space.

We can use a linked node list as with stacks.

However, for efficiency we must be able to quickly access both the head and the tail positions:

Q: Which end of the list should be the head, and which the tail?

A:


previous | index | next