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.1 INTRODUCTION

10.1 INTRODUCTION

Linked lists are useful for applications where frequent deletion and insertion of data occurs. A related structure is one where addition and deletion take place in a special manner. It is a 'queue'; entering a cinema or sports event or boarding a bus is—or should be—an orderly process operating to the rule 'first in, first out' (FIFO). The first person joins an empty queue and will be first to leave it; others join behind at the tail. While queues have some of the characteristics of linked lists, access to items within the queue is not normally required, being limited to the tail and head.

The abstract data type (ADT) for a queue can be given as follows: A queue is a collection of items of the same data type, accessed in a FIFO fashion, with the following operations:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free Trial


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