Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Queues > 10.7 PRACTICAL IMPLEMENTATION

10.7 PRACTICAL IMPLEMENTATION

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.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint