SlideShare a Scribd company logo
DATA STRUCTURE:
CIRCULAR QUEUE
Dhananjaysinh Jhala
SY CE1,170410107027
Batch B
CONTENTS
• What is circular queue ?
• Why to use circular queue ?
• C program of circular queue using array
• Example
What is circular queue ?
• Circular queue is a type of queue where the first index comes right after the
last index.
• Conceptually, you can think of a circular queue
as shown in Fig
Why to use circular queue ?
• In CQ we utilize memory efficiently. because in queue when we delete any
element only front increment by 1, but that position is not used later. so
when we perform more add and delete operation, memory wastage increase.
• But in CQ memory is utilized, if we delete any element that position is used
later, because it is circular.
C program of circular queue using array
Example
Circular Queue data structure
Circular Queue data structure
Circular Queue data structure

More Related Content

What's hot

Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
Circular link list.ppt
Circular link list.pptCircular link list.ppt
Circular link list.ppt
Tirthika Bandi
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
Sowmya Jyothi
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
Lovely Professional University
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
Elavarasi K
 
Stack
StackStack
List Data Structure
List Data StructureList Data Structure
List Data Structure
Zidny Nafan
 
Queue
QueueQueue
Queues
QueuesQueues
Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation
AhmedAlbutty
 
Binary tree
Binary tree Binary tree
Binary tree
Rajendran
 
linked list
linked list linked list
linked list
Mohaimin Rahat
 
Priority queue in DSA
Priority queue in DSAPriority queue in DSA
Priority queue in DSA
junnubabu
 
stack presentation
stack presentationstack presentation
Insertion sort
Insertion sort Insertion sort
Insertion sort
Monalisa Patel
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
anooppjoseph
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
Adam Mukharil Bachtiar
 
Data Structure (Stack)
Data Structure (Stack)Data Structure (Stack)
Data Structure (Stack)
Adam Mukharil Bachtiar
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
KristinaBorooah
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
Himanshu Kesharwani
 

What's hot (20)

Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Circular link list.ppt
Circular link list.pptCircular link list.ppt
Circular link list.ppt
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Stack
StackStack
Stack
 
List Data Structure
List Data StructureList Data Structure
List Data Structure
 
Queue
QueueQueue
Queue
 
Queues
QueuesQueues
Queues
 
Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation Bubble Sort Algorithm Presentation
Bubble Sort Algorithm Presentation
 
Binary tree
Binary tree Binary tree
Binary tree
 
linked list
linked list linked list
linked list
 
Priority queue in DSA
Priority queue in DSAPriority queue in DSA
Priority queue in DSA
 
stack presentation
stack presentationstack presentation
stack presentation
 
Insertion sort
Insertion sort Insertion sort
Insertion sort
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
Data Structure (Stack)
Data Structure (Stack)Data Structure (Stack)
Data Structure (Stack)
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 

More from Dhananjaysinh Jhala

Food donation project report II
Food donation project report IIFood donation project report II
Food donation project report II
Dhananjaysinh Jhala
 
Food donation project report I
Food donation project report IFood donation project report I
Food donation project report I
Dhananjaysinh Jhala
 
JavaScript own objects(Web Technology)
JavaScript own objects(Web Technology)JavaScript own objects(Web Technology)
JavaScript own objects(Web Technology)
Dhananjaysinh Jhala
 
Coding standard and coding guideline
Coding standard and coding guidelineCoding standard and coding guideline
Coding standard and coding guideline
Dhananjaysinh Jhala
 
BCD arithmetic and 16-bit data operations
BCD arithmetic and 16-bit data operationsBCD arithmetic and 16-bit data operations
BCD arithmetic and 16-bit data operations
Dhananjaysinh Jhala
 
Design of a two pass assembler
Design of a two pass assemblerDesign of a two pass assembler
Design of a two pass assembler
Dhananjaysinh Jhala
 
Binary search trees
Binary search treesBinary search trees
Binary search trees
Dhananjaysinh Jhala
 
Sleeping barber problem
Sleeping barber problemSleeping barber problem
Sleeping barber problem
Dhananjaysinh Jhala
 
Email and DNS
Email and DNSEmail and DNS
Email and DNS
Dhananjaysinh Jhala
 
Friend function OOPC
Friend function OOPCFriend function OOPC
Friend function OOPC
Dhananjaysinh Jhala
 
applications of first order non linear partial differential equation
applications of first order non linear partial differential equationapplications of first order non linear partial differential equation
applications of first order non linear partial differential equation
Dhananjaysinh Jhala
 
concepts of national income
concepts of national income concepts of national income
concepts of national income
Dhananjaysinh Jhala
 
variable entered map digital electronics
variable entered map digital electronicsvariable entered map digital electronics
variable entered map digital electronics
Dhananjaysinh Jhala
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
Dhananjaysinh Jhala
 
Dark sensor using photodiode
Dark sensor using photodiodeDark sensor using photodiode
Dark sensor using photodiode
Dhananjaysinh Jhala
 
Parabola, hyperbola and its applications
Parabola, hyperbola and its applicationsParabola, hyperbola and its applications
Parabola, hyperbola and its applications
Dhananjaysinh Jhala
 
1st, 2nd kind improper integrals
1st, 2nd kind improper integrals 1st, 2nd kind improper integrals
1st, 2nd kind improper integrals
Dhananjaysinh Jhala
 
Corporate life and skills
Corporate life and skillsCorporate life and skills
Corporate life and skills
Dhananjaysinh Jhala
 
type1,2 superconductors
type1,2 superconductors type1,2 superconductors
type1,2 superconductors
Dhananjaysinh Jhala
 
Earthing, grounding and isolation
Earthing, grounding and isolation Earthing, grounding and isolation
Earthing, grounding and isolation
Dhananjaysinh Jhala
 

More from Dhananjaysinh Jhala (20)

Food donation project report II
Food donation project report IIFood donation project report II
Food donation project report II
 
Food donation project report I
Food donation project report IFood donation project report I
Food donation project report I
 
JavaScript own objects(Web Technology)
JavaScript own objects(Web Technology)JavaScript own objects(Web Technology)
JavaScript own objects(Web Technology)
 
Coding standard and coding guideline
Coding standard and coding guidelineCoding standard and coding guideline
Coding standard and coding guideline
 
BCD arithmetic and 16-bit data operations
BCD arithmetic and 16-bit data operationsBCD arithmetic and 16-bit data operations
BCD arithmetic and 16-bit data operations
 
Design of a two pass assembler
Design of a two pass assemblerDesign of a two pass assembler
Design of a two pass assembler
 
Binary search trees
Binary search treesBinary search trees
Binary search trees
 
Sleeping barber problem
Sleeping barber problemSleeping barber problem
Sleeping barber problem
 
Email and DNS
Email and DNSEmail and DNS
Email and DNS
 
Friend function OOPC
Friend function OOPCFriend function OOPC
Friend function OOPC
 
applications of first order non linear partial differential equation
applications of first order non linear partial differential equationapplications of first order non linear partial differential equation
applications of first order non linear partial differential equation
 
concepts of national income
concepts of national income concepts of national income
concepts of national income
 
variable entered map digital electronics
variable entered map digital electronicsvariable entered map digital electronics
variable entered map digital electronics
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
 
Dark sensor using photodiode
Dark sensor using photodiodeDark sensor using photodiode
Dark sensor using photodiode
 
Parabola, hyperbola and its applications
Parabola, hyperbola and its applicationsParabola, hyperbola and its applications
Parabola, hyperbola and its applications
 
1st, 2nd kind improper integrals
1st, 2nd kind improper integrals 1st, 2nd kind improper integrals
1st, 2nd kind improper integrals
 
Corporate life and skills
Corporate life and skillsCorporate life and skills
Corporate life and skills
 
type1,2 superconductors
type1,2 superconductors type1,2 superconductors
type1,2 superconductors
 
Earthing, grounding and isolation
Earthing, grounding and isolation Earthing, grounding and isolation
Earthing, grounding and isolation
 

Recently uploaded

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
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
 
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
 
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
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
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
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
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
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 

Recently uploaded (20)

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
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
 
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
 
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
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
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...
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
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)
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 

Circular Queue data structure

  • 1. DATA STRUCTURE: CIRCULAR QUEUE Dhananjaysinh Jhala SY CE1,170410107027 Batch B
  • 2. CONTENTS • What is circular queue ? • Why to use circular queue ? • C program of circular queue using array • Example
  • 3. What is circular queue ? • Circular queue is a type of queue where the first index comes right after the last index. • Conceptually, you can think of a circular queue as shown in Fig
  • 4. Why to use circular queue ? • In CQ we utilize memory efficiently. because in queue when we delete any element only front increment by 1, but that position is not used later. so when we perform more add and delete operation, memory wastage increase. • But in CQ memory is utilized, if we delete any element that position is used later, because it is circular.
  • 5. C program of circular queue using array
  • 6.
  • 7.
  • 8.