PRESENTATION ON QUEUE
PRESENTED BY:YOGESH SUWAL
SUBESH SHRESTHA
DUDHARAJ LAMA
ROJAN PARIYAR
1
3/7/2017
CONTENTS
• INTRODUCTION
• TYPES
• OPERATIONS
• REFERENCE
2
3/7/2017
INTRODUCTION ON QUEUE
• Queue is a Linear Data Structure that works on First-in-First-Out
(FIFO) principle.
• It has two pointers, ‘Front’ that points to the beginning of the
queue and ‘Rear’ that points to the end of the queue.
• The ‘Front’ and ‘Rear’ pointers are manipulated constantly to
always point to the beginning and end of queue.
• It can be implemented using Arrays and Linked Lists (Recursive
and Non-recursive) methods both.
3
3/7/2017
QUEUE 4
3/7/2017
TYPES OF QUEUE
• 1.Simple or linear queue:
Linked lists are among the simplest and most common data
structures.
They can be used to implement several other common abstract
data types, including lists(the abstract data type), stacks, queues,
associative arrays, and S-expressions, though it is not uncommon
to implement the other data structures directly without using a
list as the basis of implementation.
5
3/7/2017
SIMPLE QUEUE 6
3/7/2017
TYPES OF QUEUE CONT.
• 2.Circular queue:
Circular queue is a linear data structure. It follows FIFO principle.
In circular queue,the last node is connected back to the first node to
make a circle. Circular linked list follow the First In First Out
principle. Elements are added at the rear end and the elements are
deleted at front end of the queue.
7
3/7/2017
CIRCULAR QUEUE 8
3/7/2017
TYPES OF QUEUE CONT.
• 3.Priority queue:
Priority queue is an abstract data type such as queues,stacks and
dictionaries.
While removing an element from a priority queue, the data item
with the highest priority is removed first.
In a priority queue, insertion is performed in the order of arrival
and deletion is performed based on the priority.
9
3/7/2017
PRIORITY QUEUE 10
3/7/2017
TYPES OF QUEUE CONT.
• 4.Dequeue:
A double-ended queue (dequeue) is an abstract data type that
generalizes a queue, for which elements can be added to or
removed from either the front (head) or back (tail).
It is also often called a head-tail linked list, though properly this
refers to a specific data structure implementation.
11
3/7/2017
ENQUEUE AND DEQUEUE OPERATION 12
3/7/2017
OPERATIONS OF QUEUE
• enqueue() − add (store) an item to the queue.
• dequeue() − remove (access) an item from the queue.
• Few more functions are required to make the above-mentioned
queue operation efficient. These are −
• peek() − Gets the element at the front of the queue without
removing it.
• isfull() − Checks if the queue is full.
• isempty() − Checks if the queue is empty.
13
3/7/2017
REFERENCE
• http://www.tutorialride.com/data-structures/priority-queue-in-
data-structure.html
• https://www.tutorialspoint.com/data_structures_algorithms/dsa_
queue.html
• http://www.ultimatitsolution.in/p/what-is-queue-explain-types-
of-queue.html
14
3/7/2017
THANK YOU 15
3/7/2017

Presentation on queue

  • 1.
    PRESENTATION ON QUEUE PRESENTEDBY:YOGESH SUWAL SUBESH SHRESTHA DUDHARAJ LAMA ROJAN PARIYAR 1 3/7/2017
  • 2.
    CONTENTS • INTRODUCTION • TYPES •OPERATIONS • REFERENCE 2 3/7/2017
  • 3.
    INTRODUCTION ON QUEUE •Queue is a Linear Data Structure that works on First-in-First-Out (FIFO) principle. • It has two pointers, ‘Front’ that points to the beginning of the queue and ‘Rear’ that points to the end of the queue. • The ‘Front’ and ‘Rear’ pointers are manipulated constantly to always point to the beginning and end of queue. • It can be implemented using Arrays and Linked Lists (Recursive and Non-recursive) methods both. 3 3/7/2017
  • 4.
  • 5.
    TYPES OF QUEUE •1.Simple or linear queue: Linked lists are among the simplest and most common data structures. They can be used to implement several other common abstract data types, including lists(the abstract data type), stacks, queues, associative arrays, and S-expressions, though it is not uncommon to implement the other data structures directly without using a list as the basis of implementation. 5 3/7/2017
  • 6.
  • 7.
    TYPES OF QUEUECONT. • 2.Circular queue: Circular queue is a linear data structure. It follows FIFO principle. In circular queue,the last node is connected back to the first node to make a circle. Circular linked list follow the First In First Out principle. Elements are added at the rear end and the elements are deleted at front end of the queue. 7 3/7/2017
  • 8.
  • 9.
    TYPES OF QUEUECONT. • 3.Priority queue: Priority queue is an abstract data type such as queues,stacks and dictionaries. While removing an element from a priority queue, the data item with the highest priority is removed first. In a priority queue, insertion is performed in the order of arrival and deletion is performed based on the priority. 9 3/7/2017
  • 10.
  • 11.
    TYPES OF QUEUECONT. • 4.Dequeue: A double-ended queue (dequeue) is an abstract data type that generalizes a queue, for which elements can be added to or removed from either the front (head) or back (tail). It is also often called a head-tail linked list, though properly this refers to a specific data structure implementation. 11 3/7/2017
  • 12.
    ENQUEUE AND DEQUEUEOPERATION 12 3/7/2017
  • 13.
    OPERATIONS OF QUEUE •enqueue() − add (store) an item to the queue. • dequeue() − remove (access) an item from the queue. • Few more functions are required to make the above-mentioned queue operation efficient. These are − • peek() − Gets the element at the front of the queue without removing it. • isfull() − Checks if the queue is full. • isempty() − Checks if the queue is empty. 13 3/7/2017
  • 14.
  • 15.