enqueue places the new element in link node at the end of the linked list ( the node that rear points toand then advances rear to point to the new link node method dequeue grabs the first element of the list removes it comparison of array-based and linked queues all member functions for both the array-based and linked queue implementations require constant time the space comparison issues are the same as for the equivalent stack implementations unlike the array-based stack implementationthere is no convenient way to store two queues in the same arrayunless items are always transferred directly from one queue to the other dictionaries the most common objective of computer programs is to store and retrieve data much of this book is about efficient ways to organize collections of data records so that they can be stored and retrieved quickly in this section we describe simple interface for such collectioncalled dictionary the dictionary adt provides operations for storing recordsfinding recordsand removing records from the collection this adt gives us standard basis for comparing various data structures before we can discuss the interface for dictionarywe must first define the concepts of key and comparable objects if we want to search for given record in databasehow should we describe what we are looking fora database record could simply be numberor it could be quite complicatedsuch as payroll record with many fields of varying types we do not want to describe what we are looking for by detailing and matching the entire contents of the record if we knew everything about the record alreadywe probably would not need to look for it insteadwe typically define what record we want in terms of key value for exampleif searching for payroll recordswe might wish to search for the record that matches particular id number in this example the id number is the search key to implement the search functionwe require that keys be comparable at minimumwe must be able to take two keys and reliably determine whether they are equal or not that is enough to enable sequential search through database of records and find one that matches given key howeverwe typically would like for the keys to define total order (see section )which means that we can tell which of two keys is greater than the other using key types with total orderings gives the database implementor the opportunity to organize collection of records in way that makes searching more efficient an example is storing the