SlideShare a Scribd company logo
Operations on Stack and Queue
Dr M M Kazi and Dr Mukti Jadhav
Dr. G. Y. Pathrikar College of CS and IT and MIT College Aurangabad
mazhar940@gmail.com and muktijadhav@gmail.com
July 4, 2016
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 1 / 13
Overview
1 Data Structure
2 Stack
3 Queue
4 Comparison
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 2 / 13
Data Structure
You have already come across elementary data types.
Integer
Real
Boolean
And some structured data types (data structures).
String
Array
Record
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 3 / 13
Data Structure
Other data structures such as:
Stacks
Queue and
Binary Trees
Have to be constructed by the programmer.
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 4 / 13
Stack
Example
The terminology associated with stacks comes from the spring-loaded
plate containers you get in canteens.
Figure
In short
They maintain the order LIFO (Last In First Out)
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 5 / 13
Stack
Working
New elements are added to the top of the stack. The item at the top of
the stack is the first to be removed.
Figure
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 6 / 13
Queue
Example
Queues are data structures that maintain the order of FIFO (First In First
Out)
Figure
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 7 / 13
Queue
Example
New elements may only be added to the end of a queue; and elements
may only be retrieved from the front of a queue.
Pointers mark the front and rear of the queue.
Figure
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 8 / 13
Comparison: Stack and Queue
Stacks used for
Calculations
Used to store the return address when a subroutine is called
Queue used for
Characters typed at a keyboard are held in a keyboard buffer
Output waiting to be printed is commonly stored in a queue
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 9 / 13
Comparison: Stack and Queue
Queues are more difficult to implement than Stacks.
A Stack can be used to reverse a Queue.
Stacks and Queues have preset sizes.
If you try to add an element to a queue or stack that has no free
space you get overflow.
If you try to remove an element from an empty queue or stack you
get underflow.
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 10 / 13
Citation
The examples and other material are are cited within the presentation:
The course material in this course requires citation [Wikispaces, 2016].
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 11 / 13
References
Contributory work (2016)
http://aqaa2computing.wikispaces.com/
Visited on 4 July 2016.
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 12 / 13
The End
Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 13 / 13

More Related Content

What's hot (20)

PPTX
Day 4( magic camp)
FatemehJamshidi5
 
PPTX
RDF data model
Jose Emilio Labra Gayo
 
PPT
Plays Well with Others, or What I’ve learned as a data provider in an intero...
Chris Freeland
 
PDF
Integrating Covid-19 Bioassays in the Open Research Knowledge Graph
Jennifer D'Souza
 
PDF
Building intelligent systems with FAIR data
Vrije Universiteit Amsterdam
 
PDF
Linked data intro primer
Karen Estlund
 
PPTX
Scientific Units in the Electronic Age
Stuart Chalk
 
PPTX
Toward Semantic Representation of Science in Electronic Laboratory Notebooks ...
Stuart Chalk
 
PDF
StaTIX - Statistical Type Inference on Linked Data
Artem Lutov
 
PPTX
A Generic Scientific Data Model and Ontology for Representation of Chemical Data
Stuart Chalk
 
PPTX
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Stuart Chalk
 
PDF
VALA Tech Camp 2017: Intro to Wikidata & SPARQL
Jane Frazier
 
PDF
Benchmarking Versioning for Big Linked Data
Graph-TA
 
PDF
FAIRness through a novel combination of Web technologies
Research Data Alliance
 
PDF
Holistic Benchmarking of Big Linked Data: HOBBIT
Graph-TA
 
PPTX
Eureka Research Workbench: A Semantic Approach to an Open Source Electroni...
Stuart Chalk
 
PDF
Unsupervised Learning of an Extensive and Usable Taxonomy for DBpedia
Marco Fossati
 
PPT
Achieving time effective federated information from scalable rdf data using s...
తేజ దండిభట్ల
 
PDF
Connections that work: Linked Open Data demystified
Jakob .
 
Day 4( magic camp)
FatemehJamshidi5
 
RDF data model
Jose Emilio Labra Gayo
 
Plays Well with Others, or What I’ve learned as a data provider in an intero...
Chris Freeland
 
Integrating Covid-19 Bioassays in the Open Research Knowledge Graph
Jennifer D'Souza
 
Building intelligent systems with FAIR data
Vrije Universiteit Amsterdam
 
Linked data intro primer
Karen Estlund
 
Scientific Units in the Electronic Age
Stuart Chalk
 
Toward Semantic Representation of Science in Electronic Laboratory Notebooks ...
Stuart Chalk
 
StaTIX - Statistical Type Inference on Linked Data
Artem Lutov
 
A Generic Scientific Data Model and Ontology for Representation of Chemical Data
Stuart Chalk
 
Rule-based Capture/Storage of Scientific Data from PDF Files and Export using...
Stuart Chalk
 
VALA Tech Camp 2017: Intro to Wikidata & SPARQL
Jane Frazier
 
Benchmarking Versioning for Big Linked Data
Graph-TA
 
FAIRness through a novel combination of Web technologies
Research Data Alliance
 
Holistic Benchmarking of Big Linked Data: HOBBIT
Graph-TA
 
Eureka Research Workbench: A Semantic Approach to an Open Source Electroni...
Stuart Chalk
 
Unsupervised Learning of an Extensive and Usable Taxonomy for DBpedia
Marco Fossati
 
Achieving time effective federated information from scalable rdf data using s...
తేజ దండిభట్ల
 
Connections that work: Linked Open Data demystified
Jakob .
 

Viewers also liked (12)

PDF
Repubblica - Divorzio breve, ora si accelera il Comune assume15 impiegati
Gianguido Passoni
 
PPS
The Art Of Feeling Well
pavankumar83
 
PDF
AYAPROW BIO Original
AYAPROW BiggFunMusic
 
PDF
OpenShift for Triangle JavaUG
Steve Speicher
 
PDF
Juana llovizna
Miss B Gonzalez Classroom
 
PPTX
Modernidad educativa
Alitzel Montaño Cortes
 
PDF
The Business and Management of SEO and Digital Advertising
Marketing Mojo
 
PDF
Brochure G&T Protseg
Maximo David Tello Mucha
 
PPTX
ctc投資金律
Fan Lin
 
PDF
Hawkular Alerting
ponceballesteros
 
PDF
Integrate Openshift with Cloudforms
Michael Lessard
 
PPT
It's Okay to Manage Your Boss
Business Book Summaries
 
Repubblica - Divorzio breve, ora si accelera il Comune assume15 impiegati
Gianguido Passoni
 
The Art Of Feeling Well
pavankumar83
 
AYAPROW BIO Original
AYAPROW BiggFunMusic
 
OpenShift for Triangle JavaUG
Steve Speicher
 
Modernidad educativa
Alitzel Montaño Cortes
 
The Business and Management of SEO and Digital Advertising
Marketing Mojo
 
Brochure G&T Protseg
Maximo David Tello Mucha
 
ctc投資金律
Fan Lin
 
Hawkular Alerting
ponceballesteros
 
Integrate Openshift with Cloudforms
Michael Lessard
 
It's Okay to Manage Your Boss
Business Book Summaries
 
Ad

Similar to Stack queue (9)

PDF
TEXT CLUSTERING USING INCREMENTAL FREQUENT PATTERN MINING APPROACH
IJDKP
 
PDF
Techniques for Context-Aware and Cold-Start Recommendations
Matthias Braunhofer
 
PDF
A Framework to Automatically Extract Funding Information from Text
Deep Kayal
 
PDF
Eswc2018 wimu slides
André Valdestilhas
 
PDF
A survey on massively Parallelism for indexing multidimensional datasets on t...
Tejovat Technologies Pvt.Ltd.,Wakad
 
PDF
a look at the postgresql engine
Federico Campoli
 
PPTX
ABSTAT: Ontology-driven Linked Data Summaries with Pattern Minimalization
Blerina Spahiu
 
PDF
Using ID3 Decision Tree Algorithm to the Student Grade Analysis and Prediction
ijtsrd
 
PDF
Ontop: Answering SPARQL Queries over Relational Databases
Guohui Xiao
 
TEXT CLUSTERING USING INCREMENTAL FREQUENT PATTERN MINING APPROACH
IJDKP
 
Techniques for Context-Aware and Cold-Start Recommendations
Matthias Braunhofer
 
A Framework to Automatically Extract Funding Information from Text
Deep Kayal
 
Eswc2018 wimu slides
André Valdestilhas
 
A survey on massively Parallelism for indexing multidimensional datasets on t...
Tejovat Technologies Pvt.Ltd.,Wakad
 
a look at the postgresql engine
Federico Campoli
 
ABSTAT: Ontology-driven Linked Data Summaries with Pattern Minimalization
Blerina Spahiu
 
Using ID3 Decision Tree Algorithm to the Student Grade Analysis and Prediction
ijtsrd
 
Ontop: Answering SPARQL Queries over Relational Databases
Guohui Xiao
 
Ad

Recently uploaded (20)

PPTX
Folding Off Hours in Gantt View in Odoo 18.2
Celine George
 
PPTX
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
PDF
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
PPTX
Blanket Order in Odoo 17 Purchase App - Odoo Slides
Celine George
 
PPTX
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
PPTX
HIRSCHSPRUNG'S DISEASE(MEGACOLON): NURSING MANAGMENT.pptx
PRADEEP ABOTHU
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPT
digestive system for Pharm d I year HAP
rekhapositivity
 
PDF
Comprehensive Guide to Writing Effective Literature Reviews for Academic Publ...
AJAYI SAMUEL
 
PPTX
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
PPTX
Various Psychological tests: challenges and contemporary trends in psychologi...
santoshmohalik1
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPTX
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
PDF
NC DHHS Information about Measles and Vaccination
Mebane Rash
 
PDF
A guide to responding to Section C essay tasks for the VCE English Language E...
jpinnuck
 
PDF
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
How to Consolidate Subscription Billing in Odoo 18 Sales
Celine George
 
PPTX
Latest Features in Odoo 18 - Odoo slides
Celine George
 
PPTX
ENGLISH LEARNING ACTIVITY SHE W5Q1.pptxY
CHERIEANNAPRILSULIT1
 
Folding Off Hours in Gantt View in Odoo 18.2
Celine George
 
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
07.15.2025 - Managing Your Members Using a Membership Portal.pdf
TechSoup
 
Blanket Order in Odoo 17 Purchase App - Odoo Slides
Celine George
 
Mrs Mhondiwa Introduction to Algebra class
sabinaschimanga
 
HIRSCHSPRUNG'S DISEASE(MEGACOLON): NURSING MANAGMENT.pptx
PRADEEP ABOTHU
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
digestive system for Pharm d I year HAP
rekhapositivity
 
Comprehensive Guide to Writing Effective Literature Reviews for Academic Publ...
AJAYI SAMUEL
 
Accounting Skills Paper-I, Preparation of Vouchers
Dr. Sushil Bansode
 
Various Psychological tests: challenges and contemporary trends in psychologi...
santoshmohalik1
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
How to Define Translation to Custom Module And Add a new language in Odoo 18
Celine George
 
NC DHHS Information about Measles and Vaccination
Mebane Rash
 
A guide to responding to Section C essay tasks for the VCE English Language E...
jpinnuck
 
Federal dollars withheld by district, charter, grant recipient
Mebane Rash
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
How to Consolidate Subscription Billing in Odoo 18 Sales
Celine George
 
Latest Features in Odoo 18 - Odoo slides
Celine George
 
ENGLISH LEARNING ACTIVITY SHE W5Q1.pptxY
CHERIEANNAPRILSULIT1
 

Stack queue

  • 1. Operations on Stack and Queue Dr M M Kazi and Dr Mukti Jadhav Dr. G. Y. Pathrikar College of CS and IT and MIT College Aurangabad [email protected] and [email protected] July 4, 2016 Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 1 / 13
  • 2. Overview 1 Data Structure 2 Stack 3 Queue 4 Comparison Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 2 / 13
  • 3. Data Structure You have already come across elementary data types. Integer Real Boolean And some structured data types (data structures). String Array Record Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 3 / 13
  • 4. Data Structure Other data structures such as: Stacks Queue and Binary Trees Have to be constructed by the programmer. Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 4 / 13
  • 5. Stack Example The terminology associated with stacks comes from the spring-loaded plate containers you get in canteens. Figure In short They maintain the order LIFO (Last In First Out) Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 5 / 13
  • 6. Stack Working New elements are added to the top of the stack. The item at the top of the stack is the first to be removed. Figure Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 6 / 13
  • 7. Queue Example Queues are data structures that maintain the order of FIFO (First In First Out) Figure Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 7 / 13
  • 8. Queue Example New elements may only be added to the end of a queue; and elements may only be retrieved from the front of a queue. Pointers mark the front and rear of the queue. Figure Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 8 / 13
  • 9. Comparison: Stack and Queue Stacks used for Calculations Used to store the return address when a subroutine is called Queue used for Characters typed at a keyboard are held in a keyboard buffer Output waiting to be printed is commonly stored in a queue Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 9 / 13
  • 10. Comparison: Stack and Queue Queues are more difficult to implement than Stacks. A Stack can be used to reverse a Queue. Stacks and Queues have preset sizes. If you try to add an element to a queue or stack that has no free space you get overflow. If you try to remove an element from an empty queue or stack you get underflow. Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 10 / 13
  • 11. Citation The examples and other material are are cited within the presentation: The course material in this course requires citation [Wikispaces, 2016]. Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 11 / 13
  • 12. References Contributory work (2016) http://aqaa2computing.wikispaces.com/ Visited on 4 July 2016. Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 12 / 13
  • 13. The End Dr M M Kazi and Dr Mukti Jadhav (DR GYP) Stack and Queue July 4, 2016 13 / 13