1 / 10

The Queue Data Structure

Cousin of the Stack. The Queue Data Structure. Examples of Queues. An abstract data type (container class) in which items are entered at one end and removed from the other end First In First Out (FIFO) No standard queue terminology Insertion operations may be called:

nhung
Download Presentation

The Queue Data Structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cousin of the Stack The Queue Data Structure

  2. Examples of Queues

  3. An abstract data type (container class) in which items are entered at one end and removed from the other end • First In First Out (FIFO) • No standard queue terminology • Insertion operations may be called: • enqueue, enque, enq, enter or insert • Deletion operations may be called: • dequeue, deque, deq, delete or remove Queue

  4. Array? Linked List? How To implement the Queue

  5. Singly linked? Doubly linked? Linked List

  6. Which End is FRONT of list? • Strategy A: Tail is Front • Strategy B: Head is Front Singly Linked List Delete at tail of list Insert at tail of list Insert at head of list Delete at head of list

  7. Singly Linked List Header

  8. Singly Linked List Header

  9. Doubly Linked List Header

  10. Client

More Related