Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Let us develop an array version of a linear queue, using the first de-queue strategy discussed in Section 10.6.2. It should convince you that a number of alternatives exist for the implementation of a given ADT.
The version must permit the operations of initialization, en-queueing and de-queueing, and the tests for an empty queue. An essential extra test is required for a full queue, so that array bounds are not exceeded. We shall also add an operation to view the head item without de-queueing it, for illustration purposes in the example program.