SlideShare a Scribd company logo
Queue is an abstract data structure that follows the FIFO
(First In First Out) principle where an element that is added
first will be deleted first. Also, there are linear data structures
as the elements are linearly arranged.
QUEUE
Agner Krarup Erlang (1878-1929) the Danish
telecommunication engineer started applying principles of
queuing theory in the area of telecommunications.
QUEUE--
Operations on Queue---
 1.Insertion :
Placing an item in a queue is called “insertion or “enqueue”, which is done at the end
of the queue called “rear”.
 2.Deletion :
Removing an item from a queue is called “deletion or “dequeue” , which is done at the
other end of the queue called “front”
Types of Queues--
1. Deque
2. Circular Queue
3. Priority Queue
DEQUES--
 1.Deque stands for double ended queue.
 2.Elements can be inserted or deleted at either end.
 3. Also known as head-tail linked list.
TYPE OF DEQUEUE--
 Input restricted dequeue
Element can be inserted only at one end.
Element can be removed by both end.
 Output restricted dequeuer
Element can be inserted at both end.
Element can be removed by one end.
CIRCULAR QUEUES---
 • Circular queue are used to remove the drawback of simple queue.
 • Both the front and the rear pointers wrap around to the beginning of the array.
 •It is also called as “Ring buffer”
PRIORITY QUEUE---
 1.It is collection of elements where elements are stored according to the their
priority levels.
 2.Inserting and removing of elements from queue is decided by the priority of the
elements.
 3. An element of the higher priority is processed first.
 4.Two element of same priority are processed on first-come-first-served basis.
Example: Suppose you have a few assignment
from different subjects.Which assignment will you
want to do first?
Subject Due date Priority
DLD 6 OCT 2020 1
OR 12 OCT 2020 3
DSN 10 OCT 2020 2
DSA 13 OCT 2020 4
APPLICATIONS--
**Real world applications**
 Cashier line in any store.
 Waiting on hold for tech support.
 people on an escalator.
 Checkout at any book store
 Traffic light functioning is the best example for circular queues. The colors in the
traffic light follow a circular pattern.
 In page replacement algorithms, a circular list of pages is maintained and when a page
needs to be replaced, the page in the front of the queue will be chosen.
Real world applications---
Please play this Video
Real world applications---
Applications related to computer science:
 1.When data is transferred asynchronously between two processes.
eg. IO Buffers.
 2.When a resource is shared among multiple consumers. Examples include CPU
scheduling, Disk Scheduling.
 3.In recognizing palindrome.
 4.In shared resources management.
 5.Keyboard buffer.
 6.Round robin scheduling.
 7.Job scheduling. 8.Simulation
DHEERENDRA
KUMAR
19BEE10025

More Related Content

What's hot

basics of queues
basics of queuesbasics of queues
basics of queues
sirmanohar
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
Mahmoud Alfarra
 
Ppt presentation of queues
Ppt presentation of queuesPpt presentation of queues
Ppt presentation of queues
Buxoo Abdullah
 
An Introduction to the C++ Standard Library
An Introduction to the C++ Standard LibraryAn Introduction to the C++ Standard Library
An Introduction to the C++ Standard Library
Joyjit Choudhury
 
Java Arrays and DateTime Functions
Java Arrays and DateTime FunctionsJava Arrays and DateTime Functions
Java Arrays and DateTime Functions
Jamsher bhanbhro
 
5 Array List, data structure course
5 Array List, data structure course5 Array List, data structure course
5 Array List, data structure course
Mahmoud Alfarra
 
القوائم المترابطة Linked List باستخدام لغة جافا
القوائم المترابطة Linked List باستخدام لغة جافاالقوائم المترابطة Linked List باستخدام لغة جافا
القوائم المترابطة Linked List باستخدام لغة جافا
Mahmoud Alfarra
 
Stacks in data structure
Stacks  in data structureStacks  in data structure
Stacks in data structure
lodhran-hayat
 
Ds
DsDs
Ds stack & queue
Ds   stack & queueDs   stack & queue
Ds stack & queue
Sunipa Bera
 
General Data structures
General Data structuresGeneral Data structures
General Data structures
Youssef Elsalhawy
 
Ml study notes id3
Ml study notes   id3Ml study notes   id3
Ml study notes id3
Feri Handoyo
 
Applications of queue
Applications of queueApplications of queue
Applications of queue
Saksham Khurana
 
المحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابورالمحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابور
Mahmoud Alfarra
 
Java - Collections
Java - CollectionsJava - Collections
Java - Collections
Amith jayasekara
 
3 searching algorithms in Java
3 searching algorithms in Java3 searching algorithms in Java
3 searching algorithms in Java
Mahmoud Alfarra
 
7 stack and vector
7 stack and vector7 stack and vector
7 stack and vector
Mahmoud Alfarra
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
Junghoon Kim
 

What's hot (20)

basics of queues
basics of queuesbasics of queues
basics of queues
 
Chapter 10: hashing data structure
Chapter 10:  hashing data structureChapter 10:  hashing data structure
Chapter 10: hashing data structure
 
Ppt presentation of queues
Ppt presentation of queuesPpt presentation of queues
Ppt presentation of queues
 
An Introduction to the C++ Standard Library
An Introduction to the C++ Standard LibraryAn Introduction to the C++ Standard Library
An Introduction to the C++ Standard Library
 
Java Arrays and DateTime Functions
Java Arrays and DateTime FunctionsJava Arrays and DateTime Functions
Java Arrays and DateTime Functions
 
5 Array List, data structure course
5 Array List, data structure course5 Array List, data structure course
5 Array List, data structure course
 
القوائم المترابطة Linked List باستخدام لغة جافا
القوائم المترابطة Linked List باستخدام لغة جافاالقوائم المترابطة Linked List باستخدام لغة جافا
القوائم المترابطة Linked List باستخدام لغة جافا
 
Stacks in data structure
Stacks  in data structureStacks  in data structure
Stacks in data structure
 
Structure
StructureStructure
Structure
 
Ds
DsDs
Ds
 
Ds stack & queue
Ds   stack & queueDs   stack & queue
Ds stack & queue
 
General Data structures
General Data structuresGeneral Data structures
General Data structures
 
Ml study notes id3
Ml study notes   id3Ml study notes   id3
Ml study notes id3
 
Applications of queue
Applications of queueApplications of queue
Applications of queue
 
المحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابورالمحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابور
 
Java - Collections
Java - CollectionsJava - Collections
Java - Collections
 
3 searching algorithms in Java
3 searching algorithms in Java3 searching algorithms in Java
3 searching algorithms in Java
 
Presentation on ILU
Presentation on ILUPresentation on ILU
Presentation on ILU
 
7 stack and vector
7 stack and vector7 stack and vector
7 stack and vector
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 

Similar to Queue

Chapter 7 ds
Chapter 7 dsChapter 7 ds
Chapter 7 ds
Hanif Durad
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
Lovely Professional University
 
Data Structures by Maneesh Boddu
Data Structures by Maneesh BodduData Structures by Maneesh Boddu
Data Structures by Maneesh Boddu
maneesh boddu
 
Application of Queue.pptx
Application of Queue.pptxApplication of Queue.pptx
Application of Queue.pptx
Yastee Shah
 
Data Structures 2
Data Structures 2Data Structures 2
Data Structures 2
Dr.Umadevi V
 
Lesson 4 - Queue ADT.pdf
Lesson 4 - Queue ADT.pdfLesson 4 - Queue ADT.pdf
Lesson 4 - Queue ADT.pdf
LeandroJrErcia
 
Ist year Msc,2nd sem module1
Ist year Msc,2nd sem module1Ist year Msc,2nd sem module1
Ist year Msc,2nd sem module1
blessyboban92
 
Difference between stack and queue
Difference between stack and queueDifference between stack and queue
Difference between stack and queue
Pulkitmodi1998
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
mayankKatiyar17
 
Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]
Muhammad Hammad Waseem
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
Durga Devi
 
Data Structures
Data StructuresData Structures
Data Structures
Dr.Umadevi V
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for public
iqbalphy1
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)
Mehedi Hasan
 
queue.pptx
queue.pptxqueue.pptx
queue.pptx
Dr.Shweta
 
Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)
Self-Employed
 
2 b queues
2 b queues2 b queues
2 b queues
Nguync91368
 
Stacks
StacksStacks
Queue ADT for data structure for computer
Queue ADT for data structure for computerQueue ADT for data structure for computer
Queue ADT for data structure for computer
abinathsabi
 

Similar to Queue (20)

Chapter 7 ds
Chapter 7 dsChapter 7 ds
Chapter 7 ds
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
Data Structures by Maneesh Boddu
Data Structures by Maneesh BodduData Structures by Maneesh Boddu
Data Structures by Maneesh Boddu
 
Application of Queue.pptx
Application of Queue.pptxApplication of Queue.pptx
Application of Queue.pptx
 
Data Structures 2
Data Structures 2Data Structures 2
Data Structures 2
 
Lesson 4 - Queue ADT.pdf
Lesson 4 - Queue ADT.pdfLesson 4 - Queue ADT.pdf
Lesson 4 - Queue ADT.pdf
 
Ist year Msc,2nd sem module1
Ist year Msc,2nd sem module1Ist year Msc,2nd sem module1
Ist year Msc,2nd sem module1
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
 
Difference between stack and queue
Difference between stack and queueDifference between stack and queue
Difference between stack and queue
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]Data Structures - Lecture 6 [queues]
Data Structures - Lecture 6 [queues]
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
Data Structures
Data StructuresData Structures
Data Structures
 
stacks and queues for public
stacks and queues for publicstacks and queues for public
stacks and queues for public
 
QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)QUEUE in data-structure (classification, working procedure, Applications)
QUEUE in data-structure (classification, working procedure, Applications)
 
queue.pptx
queue.pptxqueue.pptx
queue.pptx
 
Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)Queue AS an ADT (Abstract Data Type)
Queue AS an ADT (Abstract Data Type)
 
2 b queues
2 b queues2 b queues
2 b queues
 
Stacks
StacksStacks
Stacks
 
Queue ADT for data structure for computer
Queue ADT for data structure for computerQueue ADT for data structure for computer
Queue ADT for data structure for computer
 

More from DheerendraKumar43

Temperature measurement using nodemcu esp8266
Temperature measurement  using nodemcu esp8266Temperature measurement  using nodemcu esp8266
Temperature measurement using nodemcu esp8266
DheerendraKumar43
 
Buck converter in MATLAB using PID controller
Buck converter in MATLAB using PID controllerBuck converter in MATLAB using PID controller
Buck converter in MATLAB using PID controller
DheerendraKumar43
 
Control system done by dheerendra
Control system done by dheerendraControl system done by dheerendra
Control system done by dheerendra
DheerendraKumar43
 
Addiction
AddictionAddiction
Diodes // LED // OLED
Diodes // LED // OLEDDiodes // LED // OLED
Diodes // LED // OLED
DheerendraKumar43
 
momentum conservation
momentum conservationmomentum conservation
momentum conservation
DheerendraKumar43
 
energy conservation
energy conservation energy conservation
energy conservation
DheerendraKumar43
 
Maths ppt partial diffrentian eqn
Maths ppt partial diffrentian eqnMaths ppt partial diffrentian eqn
Maths ppt partial diffrentian eqn
DheerendraKumar43
 
Photodiode / diode
Photodiode / diodePhotodiode / diode
Photodiode / diode
DheerendraKumar43
 

More from DheerendraKumar43 (9)

Temperature measurement using nodemcu esp8266
Temperature measurement  using nodemcu esp8266Temperature measurement  using nodemcu esp8266
Temperature measurement using nodemcu esp8266
 
Buck converter in MATLAB using PID controller
Buck converter in MATLAB using PID controllerBuck converter in MATLAB using PID controller
Buck converter in MATLAB using PID controller
 
Control system done by dheerendra
Control system done by dheerendraControl system done by dheerendra
Control system done by dheerendra
 
Addiction
AddictionAddiction
Addiction
 
Diodes // LED // OLED
Diodes // LED // OLEDDiodes // LED // OLED
Diodes // LED // OLED
 
momentum conservation
momentum conservationmomentum conservation
momentum conservation
 
energy conservation
energy conservation energy conservation
energy conservation
 
Maths ppt partial diffrentian eqn
Maths ppt partial diffrentian eqnMaths ppt partial diffrentian eqn
Maths ppt partial diffrentian eqn
 
Photodiode / diode
Photodiode / diodePhotodiode / diode
Photodiode / diode
 

Recently uploaded

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 

Recently uploaded (20)

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 

Queue

  • 1. Queue is an abstract data structure that follows the FIFO (First In First Out) principle where an element that is added first will be deleted first. Also, there are linear data structures as the elements are linearly arranged. QUEUE
  • 2. Agner Krarup Erlang (1878-1929) the Danish telecommunication engineer started applying principles of queuing theory in the area of telecommunications.
  • 4. Operations on Queue---  1.Insertion : Placing an item in a queue is called “insertion or “enqueue”, which is done at the end of the queue called “rear”.  2.Deletion : Removing an item from a queue is called “deletion or “dequeue” , which is done at the other end of the queue called “front”
  • 5.
  • 6. Types of Queues-- 1. Deque 2. Circular Queue 3. Priority Queue
  • 7. DEQUES--  1.Deque stands for double ended queue.  2.Elements can be inserted or deleted at either end.  3. Also known as head-tail linked list.
  • 8. TYPE OF DEQUEUE--  Input restricted dequeue Element can be inserted only at one end. Element can be removed by both end.  Output restricted dequeuer Element can be inserted at both end. Element can be removed by one end.
  • 9. CIRCULAR QUEUES---  • Circular queue are used to remove the drawback of simple queue.  • Both the front and the rear pointers wrap around to the beginning of the array.  •It is also called as “Ring buffer”
  • 10. PRIORITY QUEUE---  1.It is collection of elements where elements are stored according to the their priority levels.  2.Inserting and removing of elements from queue is decided by the priority of the elements.  3. An element of the higher priority is processed first.  4.Two element of same priority are processed on first-come-first-served basis.
  • 11. Example: Suppose you have a few assignment from different subjects.Which assignment will you want to do first? Subject Due date Priority DLD 6 OCT 2020 1 OR 12 OCT 2020 3 DSN 10 OCT 2020 2 DSA 13 OCT 2020 4
  • 12. APPLICATIONS-- **Real world applications**  Cashier line in any store.  Waiting on hold for tech support.  people on an escalator.  Checkout at any book store  Traffic light functioning is the best example for circular queues. The colors in the traffic light follow a circular pattern.  In page replacement algorithms, a circular list of pages is maintained and when a page needs to be replaced, the page in the front of the queue will be chosen.
  • 15. Applications related to computer science:  1.When data is transferred asynchronously between two processes. eg. IO Buffers.  2.When a resource is shared among multiple consumers. Examples include CPU scheduling, Disk Scheduling.  3.In recognizing palindrome.  4.In shared resources management.  5.Keyboard buffer.  6.Round robin scheduling.  7.Job scheduling. 8.Simulation