Data Structure
What is a Stack?
A stack is a Last In, First Out (LIFO) data
structure,objects inserted last are the first to come
out of the stack
Anything added to the stack goes on the “top” of
the stack
Anything removed from the stack is taken from the
“top” of the stack
Things are removed in the reverse order from that
in which they were inserted
A stack is a Last In, First Out (LIFO) data
structure,objects inserted last are the first to come
out of the stack
Anything added to the stack goes on the “top” of
the stack
Anything removed from the stack is taken from the
“top” of the stack
Things are removed in the reverse order from that
in which they were inserted
Stack Operations
• PUSH
Adds the object to the top of the stack
• POP
Removes the object at the top of the
stack and returns it
• PUSH
Adds the object to the top of the stack
• POP
Removes the object at the top of the
stack and returns it
A LIFO Stack
TopStack Pointer
Push Pop
Bottom

More Related Content

PPTX
DATA STRUCTURE - STACK
PPTX
Data structure Stack
PPT
Stack a Data Structure
PPSX
Data Structure (Stack)
PPT
Stack Data Structure & It's Application
PPT
data structure, stack, stack data structure
PPTX
Introduction to stack
PPTX
Project of data structure
DATA STRUCTURE - STACK
Data structure Stack
Stack a Data Structure
Data Structure (Stack)
Stack Data Structure & It's Application
data structure, stack, stack data structure
Introduction to stack
Project of data structure

What's hot (20)

PPT
PDF
PPT
Stacks
PPT
Stacks overview with its applications
PPSX
PPTX
Stack and its Applications : Data Structures ADT
PPT
Stack Operation In Data Structure
PPT
stack and queue array implementation in java.
PPT
Stack & queue
PPTX
Stack Data Structure
PPTX
Stack of Data structure
PPTX
Stacks in DATA STRUCTURE
PPTX
Application of Stack - Yadraj Meena
PPTX
STACKS IN DATASTRUCTURE
PDF
Applications of stack
PPTX
Stack project
PPTX
Stacks in c++
PPTX
Unit 3 stack
PPTX
Introduction To Stack
Stacks
Stacks overview with its applications
Stack and its Applications : Data Structures ADT
Stack Operation In Data Structure
stack and queue array implementation in java.
Stack & queue
Stack Data Structure
Stack of Data structure
Stacks in DATA STRUCTURE
Application of Stack - Yadraj Meena
STACKS IN DATASTRUCTURE
Applications of stack
Stack project
Stacks in c++
Unit 3 stack
Introduction To Stack
Ad

Similar to Stack (20)

PPTX
Stack operation
PPTX
Stack converted
PPT
stack, opeartions on stack, applications of stack
PPTX
Introduction to stack
PPTX
Stack operation algorithms with example
PPTX
Stack PPT.pptx
PDF
Why does the stack use a FILO (first in last out) schemeSolutio.pdf
PPTX
Lecture#5 - Stack ADT.pptx
PDF
PPTX
Lists, queues and stacks
PDF
The Stack (Data Structccccccccccccccccccc
PPT
PPTX
stack in python using different datatypes.pptx
PPTX
Data structure day4
PPTX
Ds stacks
PPTX
SDFDFDFASDSDDD4ERSDFASFASDFASDFDFFASDFZSDFSD
PPT
stack and queue array implementation, java.
PDF
Stacks and queues
PPTX
Stack & Queue
Stack operation
Stack converted
stack, opeartions on stack, applications of stack
Introduction to stack
Stack operation algorithms with example
Stack PPT.pptx
Why does the stack use a FILO (first in last out) schemeSolutio.pdf
Lecture#5 - Stack ADT.pptx
Lists, queues and stacks
The Stack (Data Structccccccccccccccccccc
stack in python using different datatypes.pptx
Data structure day4
Ds stacks
SDFDFDFASDSDDD4ERSDFASFASDFASDFDFFASDFZSDFSD
stack and queue array implementation, java.
Stacks and queues
Stack & Queue
Ad

More from Samsil Arefin (20)

PPTX
Transmission Control Protocol and User Datagram protocol
PDF
Evolution Phylogenetic
PPTX
Evolution Phylogenetic
PDF
Ego net facebook data analysis
PPTX
Augmented Reality (AR)
PPTX
Client server chat application
PPTX
Strings in programming tutorial.
PDF
Linked list searching deleting inserting
PPTX
Number theory
PDF
Program to sort the n names in an alphabetical order
PDF
Linked list int_data_fdata
PDF
Linked list Output tracing
PPT
Sorting
PPTX
Fundamentals of-electric-circuit
PPTX
Cyber security
PDF
C programming
PPTX
Data structure lecture 1
PPT
Structure and union
PPT
Structure in programming in c or c++ or c# or java
PPTX
Transmission Control Protocol and User Datagram protocol
Evolution Phylogenetic
Evolution Phylogenetic
Ego net facebook data analysis
Augmented Reality (AR)
Client server chat application
Strings in programming tutorial.
Linked list searching deleting inserting
Number theory
Program to sort the n names in an alphabetical order
Linked list int_data_fdata
Linked list Output tracing
Sorting
Fundamentals of-electric-circuit
Cyber security
C programming
Data structure lecture 1
Structure and union
Structure in programming in c or c++ or c# or java

Recently uploaded (20)

PPTX
lung disease detection using transfer learning approach.pptx
PPTX
Power BI - Microsoft Power BI is an interactive data visualization software p...
PPTX
inbound2857676998455010149.pptxmmmmmmmmm
PDF
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
PPTX
cyber row.pptx for cyber proffesionals and hackers
PDF
PPT nikita containers of the company use
PPTX
inbound6529290805104538764.pptxmmmmmmmmm
PDF
American Journal of Multidisciplinary Research and Review
PDF
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
PDF
toaz.info-grade-11-2nd-quarter-earth-and-life-science-pr_5360bfd5a497b75f7ae4...
PPTX
Overview_of_Computing_Presentation.pptxxx
PDF
book-34714 (2).pdfhjkkljgfdssawtjiiiiiujj
PPTX
AI-Augmented Business Process Management Systems
PPT
2011 HCRP presentation-final.pptjrirrififfi
PDF
NU-MEP-Standards معايير تصميم جامعية .pdf
PDF
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
PPTX
ISO 9001-2015 quality management system presentation
PDF
Buddhism presentation about world religion
PDF
Mcdonald's : a half century growth . pdf
PDF
9 FinOps Tools That Simplify Cloud Cost Reporting.pdf
lung disease detection using transfer learning approach.pptx
Power BI - Microsoft Power BI is an interactive data visualization software p...
inbound2857676998455010149.pptxmmmmmmmmm
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
cyber row.pptx for cyber proffesionals and hackers
PPT nikita containers of the company use
inbound6529290805104538764.pptxmmmmmmmmm
American Journal of Multidisciplinary Research and Review
PPT IEPT 2025_Ms. Nurul Presentation 10.pdf
toaz.info-grade-11-2nd-quarter-earth-and-life-science-pr_5360bfd5a497b75f7ae4...
Overview_of_Computing_Presentation.pptxxx
book-34714 (2).pdfhjkkljgfdssawtjiiiiiujj
AI-Augmented Business Process Management Systems
2011 HCRP presentation-final.pptjrirrififfi
NU-MEP-Standards معايير تصميم جامعية .pdf
Delhi c@ll girl# cute girls in delhi with travel girls in delhi call now
ISO 9001-2015 quality management system presentation
Buddhism presentation about world religion
Mcdonald's : a half century growth . pdf
9 FinOps Tools That Simplify Cloud Cost Reporting.pdf

Stack

  • 2. What is a Stack? A stack is a Last In, First Out (LIFO) data structure,objects inserted last are the first to come out of the stack Anything added to the stack goes on the “top” of the stack Anything removed from the stack is taken from the “top” of the stack Things are removed in the reverse order from that in which they were inserted A stack is a Last In, First Out (LIFO) data structure,objects inserted last are the first to come out of the stack Anything added to the stack goes on the “top” of the stack Anything removed from the stack is taken from the “top” of the stack Things are removed in the reverse order from that in which they were inserted
  • 3. Stack Operations • PUSH Adds the object to the top of the stack • POP Removes the object at the top of the stack and returns it • PUSH Adds the object to the top of the stack • POP Removes the object at the top of the stack and returns it
  • 4. A LIFO Stack TopStack Pointer Push Pop Bottom