SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
SAJAN SINGH RATHORE
Roll No. :- MCA/25019/18
 A priority queue is a queue in which insertion
and deletion of items from any position in the
queue are done based on some property (such as
priority of task).
 Priority queue contains data items which have
some preset priority. 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.
 Rules: -
1. An element with higher priority will processed before an
element with a lower priority.
2. Two elements with the same priority are processed on a
First Come First Serve basis(FCFS).
 The advantages of priority queue is :-
 Easy to implement.
 Processes with different priority can be efficiently
handled.
 1. Ascending Priority Queue In this type of
priority queue, elements can be inserted into any
order but only the smallest element can be
removed.
 2. Descending Priority Queue In this type
of priority queue, elements can be inserted into
any order but only the largest element can be
removed.
 Using Arrays :- Insertion Operation 
While inserting elements in priority queue we
will add it at the appropriate position
depending on its priority
• It is inserted in such a way that the elements
are always ordered either in Ascending or
descending sequence
 Deletion Operation  While deletion, the
element at the front is always deleted.
Priority Queue in Data Structure
Priority Queue in Data Structure
1. Priority queue is in scheduling the jobs in
operating system . Operating system allocates
priority to jobs , the jobs are placed in the queue
and the position of the jobs in the priority queue
determines their priority.
 In operating system there are three kinds of jobs
.there are real time jobs, foreground jobs, and
background jobs. The operating system always
schedules the real time jobs first . If there is no
real time job pending then it schedule foreground
jobs . Lastly if no real time or foreground jobs are
pending then operating system schedules the
background jobs.
2. In network communication to manage limited
bandwidth for transmission the priority queue is
used .
 https://www.geeksforgeeks.org/priority-
queue-set-1-introduction/
Priority Queue in Data Structure

More Related Content

PPTX
Priority queue in DSA
PPTX
queue & its applications
PPT
PPSX
Data Structure (Queue)
PPTX
PPTX
Queue - Data Structure - Notes
PPTX
Queue in Data Structure
PPTX
Unit I-Data structures stack & Queue
Priority queue in DSA
queue & its applications
Data Structure (Queue)
Queue - Data Structure - Notes
Queue in Data Structure
Unit I-Data structures stack & Queue

What's hot (20)

PPTX
Breadth First Search & Depth First Search
PPTX
Deque and its applications
PPTX
Linked List
PPTX
Abstract Data Types
PPTX
Java package
PPTX
Insertion sort algorithm power point presentation
PPT
Queue data structure
PPTX
linked list in data structure
PPTX
Data Structures - Lecture 9 [Stack & Queue using Linked List]
PPTX
Doubly Linked List
PDF
Searching and Sorting Techniques in Data Structure
PPTX
The Stack And Recursion
PPT
Abstract data types
PPTX
Knapsack problem using greedy approach
PPSX
PPT
Linked lists
PPT
PPT
Binary Search
PPTX
Queue Implementation Using Array & Linked List
PPT
Breadth First Search & Depth First Search
Deque and its applications
Linked List
Abstract Data Types
Java package
Insertion sort algorithm power point presentation
Queue data structure
linked list in data structure
Data Structures - Lecture 9 [Stack & Queue using Linked List]
Doubly Linked List
Searching and Sorting Techniques in Data Structure
The Stack And Recursion
Abstract data types
Knapsack problem using greedy approach
Linked lists
Binary Search
Queue Implementation Using Array & Linked List
Ad

Similar to Priority Queue in Data Structure (20)

PPTX
Thisismyroughkjhfdyhbfhjbgijggjnvkppt.pptx
PDF
LEC4-DS ALGO.pdf
PPT
GAC DS Priority Queue Presentation 2022.ppt
PDF
5-Queue-----------------------------in c++
PPTX
Unit ii linear data structures
PPT
Queue Data Structure
PPT
Priority queues
PPTX
PPT
Queues.ppt
PPTX
Priority_Queue_Presentation_DATA_STRUCTURE_ALGORITHMS.pptx
PDF
Basic Terminologies of Queue...Basic operations on Queue
PPT
Priority Queue
PPTX
DS10-QUEUE0000000000000000000000000000000000000.pptx
PPTX
PriorityqDhruvBaswal.pptx
PDF
Priorty queue
PPTX
queue_final.pptx
PPTX
My lectures circular queue
PPT
Priority queues
Thisismyroughkjhfdyhbfhjbgijggjnvkppt.pptx
LEC4-DS ALGO.pdf
GAC DS Priority Queue Presentation 2022.ppt
5-Queue-----------------------------in c++
Unit ii linear data structures
Queue Data Structure
Priority queues
Queues.ppt
Priority_Queue_Presentation_DATA_STRUCTURE_ALGORITHMS.pptx
Basic Terminologies of Queue...Basic operations on Queue
Priority Queue
DS10-QUEUE0000000000000000000000000000000000000.pptx
PriorityqDhruvBaswal.pptx
Priorty queue
queue_final.pptx
My lectures circular queue
Priority queues
Ad

More from Meghaj Mallick (20)

PPT
24 partial-orderings
PPTX
PORTFOLIO BY USING HTML & CSS
PPTX
Introduction to Software Testing
PPTX
Introduction to System Programming
PPTX
MACRO ASSEBLER
PPTX
Icons, Image & Multimedia
PPTX
Project Tracking & SPC
PPTX
Peephole Optimization
PPTX
Routing in MANET
PPTX
Macro assembler
PPTX
Architecture and security in Vanet PPT
PPTX
Design Model & User Interface Design in Software Engineering
PPTX
Text Mining of Twitter in Data Mining
PPTX
DFS & BFS in Computer Algorithm
PPTX
Software Development Method
PPTX
Secant method in Numerical & Statistical Method
PPTX
Motivation in Organization
PPTX
Communication Skill
PPT
Partial-Orderings in Discrete Mathematics
PPTX
Hashing In Data Structure
24 partial-orderings
PORTFOLIO BY USING HTML & CSS
Introduction to Software Testing
Introduction to System Programming
MACRO ASSEBLER
Icons, Image & Multimedia
Project Tracking & SPC
Peephole Optimization
Routing in MANET
Macro assembler
Architecture and security in Vanet PPT
Design Model & User Interface Design in Software Engineering
Text Mining of Twitter in Data Mining
DFS & BFS in Computer Algorithm
Software Development Method
Secant method in Numerical & Statistical Method
Motivation in Organization
Communication Skill
Partial-Orderings in Discrete Mathematics
Hashing In Data Structure

Recently uploaded (20)

DOCX
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
PPTX
Tour Presentation Educational Activity.pptx
PPTX
Introduction-to-Food-Packaging-and-packaging -materials.pptx
PPTX
Impressionism_PostImpressionism_Presentation.pptx
PDF
COLEAD A2F approach and Theory of Change
PPTX
water for all cao bang - a charity project
PPTX
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
PPTX
worship songs, in any order, compilation
PPTX
2025-08-10 Joseph 02 (shared slides).pptx
PPTX
Effective_Handling_Information_Presentation.pptx
PDF
oil_refinery_presentation_v1 sllfmfls.pdf
PPTX
Anesthesia and it's stage with mnemonic and images
PDF
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
PPTX
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
PPT
The Effect of Human Resource Management Practice on Organizational Performanc...
PPTX
The Effect of Human Resource Management Practice on Organizational Performanc...
PDF
Presentation1 [Autosaved].pdf diagnosiss
PPTX
nose tajweed for the arabic alphabets for the responsive
PPTX
Project and change Managment: short video sequences for IBA
PPTX
Tablets And Capsule Preformulation Of Paracetamol
"Project Management: Ultimate Guide to Tools, Techniques, and Strategies (2025)"
Tour Presentation Educational Activity.pptx
Introduction-to-Food-Packaging-and-packaging -materials.pptx
Impressionism_PostImpressionism_Presentation.pptx
COLEAD A2F approach and Theory of Change
water for all cao bang - a charity project
AcademyNaturalLanguageProcessing-EN-ILT-M02-Introduction.pptx
worship songs, in any order, compilation
2025-08-10 Joseph 02 (shared slides).pptx
Effective_Handling_Information_Presentation.pptx
oil_refinery_presentation_v1 sllfmfls.pdf
Anesthesia and it's stage with mnemonic and images
Tunisia's Founding Father(s) Pitch-Deck 2022.pdf
INTERNATIONAL LABOUR ORAGNISATION PPT ON SOCIAL SCIENCE
The Effect of Human Resource Management Practice on Organizational Performanc...
The Effect of Human Resource Management Practice on Organizational Performanc...
Presentation1 [Autosaved].pdf diagnosiss
nose tajweed for the arabic alphabets for the responsive
Project and change Managment: short video sequences for IBA
Tablets And Capsule Preformulation Of Paracetamol

Priority Queue in Data Structure

  • 1. SAJAN SINGH RATHORE Roll No. :- MCA/25019/18
  • 2.  A priority queue is a queue in which insertion and deletion of items from any position in the queue are done based on some property (such as priority of task).  Priority queue contains data items which have some preset priority. 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.
  • 3.  Rules: - 1. An element with higher priority will processed before an element with a lower priority. 2. Two elements with the same priority are processed on a First Come First Serve basis(FCFS).  The advantages of priority queue is :-  Easy to implement.  Processes with different priority can be efficiently handled.
  • 4.  1. Ascending Priority Queue In this type of priority queue, elements can be inserted into any order but only the smallest element can be removed.  2. Descending Priority Queue In this type of priority queue, elements can be inserted into any order but only the largest element can be removed.
  • 5.  Using Arrays :- Insertion Operation  While inserting elements in priority queue we will add it at the appropriate position depending on its priority • It is inserted in such a way that the elements are always ordered either in Ascending or descending sequence  Deletion Operation  While deletion, the element at the front is always deleted.
  • 8. 1. Priority queue is in scheduling the jobs in operating system . Operating system allocates priority to jobs , the jobs are placed in the queue and the position of the jobs in the priority queue determines their priority.  In operating system there are three kinds of jobs .there are real time jobs, foreground jobs, and background jobs. The operating system always schedules the real time jobs first . If there is no real time job pending then it schedule foreground jobs . Lastly if no real time or foreground jobs are pending then operating system schedules the background jobs. 2. In network communication to manage limited bandwidth for transmission the priority queue is used .