SlideShare a Scribd company logo
2
Most read
12
Most read
13
Most read
Department of IT

Presented by-
 Narendra katariya
The stack is a very common and non
   primitive data structure used in
programs. By data structure, I mean
something that is meant to hold data
 and provides certain operations on
              that data.
Abstract definition
• A stack is a fundamental computer
  science data structure and can be defined
  in an abstract, implementation-free
  manner,
• it can be generally defined as,
  Stack is a linear list of items in which all
  additions and deletion are restricted to
  one end that is Top.
Examples of stack
Operations on stack
• a stack is a last in, first out (LIFO) abstract data
  type and Data structure
  In computer science, a data structure is a particular
  way of storing and organizing data in a computer
  so that it can be used efficiently .Different kinds of
  data structures are suited to different kinds of
  applications, and some are highly specialized to
  specific tasks...

   A stack can have any abstract data type as an
  element, but is characterized by only three
  fundamental operations: push, pop and stack top
The basic operations that can be performed
                    on stack:

• Push: The process of adding a new element of
  top of the stack is called push operation.
  Pushing an element In the stack invoke adding
  of element, as the new element will be inserted
  at the top after every push operation the top is
  incremented by one. In case the array is full and
  no new element can be accommodated ,it is
  called stack full condition . This condition is
  called stack overflow.
Pop: the process of deleting an element from the
  Top of the stack is called pop operation. After
  every pop operation the stack is decrement by
  one. If there is no element on the stack and the
  pop is performed then this will result into stack
  underflow condition.
• A common model of a stack is plates in a
  marriage party or coin stacker. Fresh plate are
  “pushed” onto to the top and “popped ” from the
  top.
Stack implementation

                 Stacks


 static array                  dynamic arrays
                          Graphical region
Parenthesis
                          fill
checker
Stack implementation in two way:
• Static implementation: these implementation uses
  arrays to create stack. Static implementation
  though a very simple technique but is not a
  flexible way of creation as the size of stack has
  to be declared during program design after that
  can not be varied. Static implementation is not
  too efficient with respect to memory utilization.
• Dynamic implementation: these implementation is
  also called link list implementation and uses
  pointer to implement the stack type of data
  structure.
Stack Applications
• A Palindrome is a string that reads the same
  in either direction
  – Examples: “Able was I ere I saw Elba”
• Reversing the string
• Implementation of DFS
 - a stack is the proper data structure to
   remember the current node and how to
   backtrack.
Calculation of arithmetic notation

• Infix notation: the infix notetion is what we come
  across our general mathematics, where the
  opereter is written in between the operand.
Example: A+B
• prefix notation: the prefix notation a notation in which
  the operators is written before the operand, it is also
  called polish notation.
Example: +AB
• Postfix notation: in the postfix notation the operators
  are written after the operands, so it’s called the postfix
  notation’ it’s also called suffix notation.
Example :AB+
Thank you

More Related Content

PPTX
Stack and its operations
PPT
Expression evaluation
PPTX
Java Stack Data Structure.pptx
PPTX
Application of Stack For Expression Evaluation by Prakash Zodge DSY 41.pptx
PPT
stack and queue array implementation in java.
PPTX
Stack & Queue using Linked List in Data Structure
PPTX
Unit II - LINEAR DATA STRUCTURES
PPTX
Stack_Data_Structure.pptx
Stack and its operations
Expression evaluation
Java Stack Data Structure.pptx
Application of Stack For Expression Evaluation by Prakash Zodge DSY 41.pptx
stack and queue array implementation in java.
Stack & Queue using Linked List in Data Structure
Unit II - LINEAR DATA STRUCTURES
Stack_Data_Structure.pptx

What's hot (20)

PPTX
Linked list
PPTX
Linked List
PPTX
Computer Science-Data Structures :Abstract DataType (ADT)
PPTX
single linked list
PPTX
Queue in Data Structure
PPT
Python Dictionaries and Sets
PPT
PPTX
Deque and its applications
PPTX
Circular linked list
PPSX
Data Structure (Queue)
PPT
Infix prefix postfix
PPTX
Stacks IN DATA STRUCTURES
PDF
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
PPTX
Queue - Data Structure - Notes
PPTX
The Stack And Recursion
PPT
PPTX
Stacks and Queue - Data Structures
PPTX
Binary Tree Traversal
PPTX
PPT
Data Structures- Part5 recursion
Linked list
Linked List
Computer Science-Data Structures :Abstract DataType (ADT)
single linked list
Queue in Data Structure
Python Dictionaries and Sets
Deque and its applications
Circular linked list
Data Structure (Queue)
Infix prefix postfix
Stacks IN DATA STRUCTURES
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Queue - Data Structure - Notes
The Stack And Recursion
Stacks and Queue - Data Structures
Binary Tree Traversal
Data Structures- Part5 recursion
Ad

Viewers also liked (20)

PPTX
Stack data structure
PPTX
STACKS IN DATASTRUCTURE
PPT
Stack Data Structure & It's Application
PPSX
PPSX
Stacks Implementation and Examples
PPT
Queue data structure
PPT
Queue Data Structure
PDF
PDF
Applications of stack
PPTX
Data structure Stack
PPT
Stack Data Structure V1.0
PPSX
Data Structure (Stack)
PPT
Application of Stacks
PPT
Stacks & Queues By Ms. Niti Arora
PPTX
Stack Data structure
PPTX
Ppt presentation of queues
PPT
DATA STRUCTURES
PPTX
Trees data structure
PPT
Queue and stacks
Stack data structure
STACKS IN DATASTRUCTURE
Stack Data Structure & It's Application
Stacks Implementation and Examples
Queue data structure
Queue Data Structure
Applications of stack
Data structure Stack
Stack Data Structure V1.0
Data Structure (Stack)
Application of Stacks
Stacks & Queues By Ms. Niti Arora
Stack Data structure
Ppt presentation of queues
DATA STRUCTURES
Trees data structure
Queue and stacks
Ad

Similar to Stack a Data Structure (20)

PDF
The Stack (Data Structccccccccccccccccccc
PPTX
STACK AND QUEUE CIRCULAR QUEUE PPTS.pptx
PPTX
5.-Stacks.pptx
PPTX
STACK.pptx
PPTX
Data Structure - Stacks
PPT
week 7,8,10,11 alll files included from .ppt
PPTX
Unit 3 stack
PPTX
DS-UNIT 3 FINAL.pptx
PPTX
Stack in Sata Structure
PPTX
Stacks Data structure.pptx
PDF
4-Stack --------------------------------in C++.pdf
PPTX
Stack and its operations, Queue and its operations
PPTX
Data Structures Stack and Queue Data Structures
PPTX
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
PDF
Data structures stacks
PPT
stack data structure and its applications , advantages, disadvantages etc
PPT
stack data structure , applications, advantages
PPT
Linear Datsructure_stacks_Data Structure_PPT.ppt
PPT
stack is an ordered list in which insertion and deletion are done at one end,...
PPTX
STACK_IN_DATA STRUCTURE AND ALGORITHMS.pptx
The Stack (Data Structccccccccccccccccccc
STACK AND QUEUE CIRCULAR QUEUE PPTS.pptx
5.-Stacks.pptx
STACK.pptx
Data Structure - Stacks
week 7,8,10,11 alll files included from .ppt
Unit 3 stack
DS-UNIT 3 FINAL.pptx
Stack in Sata Structure
Stacks Data structure.pptx
4-Stack --------------------------------in C++.pdf
Stack and its operations, Queue and its operations
Data Structures Stack and Queue Data Structures
STACK AND ITS OPERATIONS IN DATA STRUCTURES.pptx
Data structures stacks
stack data structure and its applications , advantages, disadvantages etc
stack data structure , applications, advantages
Linear Datsructure_stacks_Data Structure_PPT.ppt
stack is an ordered list in which insertion and deletion are done at one end,...
STACK_IN_DATA STRUCTURE AND ALGORITHMS.pptx

More from ForwardBlog Enewzletter (10)

PPT
Sorting searching
PPTX
PPT
Feedback amplifiers
PPTX
PPTX
Compile time polymorphism
PPTX
Constructors & destructors
PPTX
Parameter passing to_functions_in_c
PPTX
Propositional logic
PPT
Presentation on graphs
Sorting searching
Feedback amplifiers
Compile time polymorphism
Constructors & destructors
Parameter passing to_functions_in_c
Propositional logic
Presentation on graphs

Recently uploaded (20)

PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Computing-Curriculum for Schools in Ghana
PDF
Classroom Observation Tools for Teachers
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
01-Introduction-to-Information-Management.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Trump Administration's workforce development strategy
PPTX
Cell Types and Its function , kingdom of life
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
A systematic review of self-coping strategies used by university students to ...
Computing-Curriculum for Schools in Ghana
Classroom Observation Tools for Teachers
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems
Yogi Goddess Pres Conference Studio Updates
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Pharma ospi slides which help in ospi learning
Microbial diseases, their pathogenesis and prophylaxis
VCE English Exam - Section C Student Revision Booklet
01-Introduction-to-Information-Management.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
RMMM.pdf make it easy to upload and study
Trump Administration's workforce development strategy
Cell Types and Its function , kingdom of life
STATICS OF THE RIGID BODIES Hibbelers.pdf

Stack a Data Structure

  • 1. Department of IT Presented by- Narendra katariya
  • 2. The stack is a very common and non primitive data structure used in programs. By data structure, I mean something that is meant to hold data and provides certain operations on that data.
  • 3. Abstract definition • A stack is a fundamental computer science data structure and can be defined in an abstract, implementation-free manner, • it can be generally defined as, Stack is a linear list of items in which all additions and deletion are restricted to one end that is Top.
  • 5. Operations on stack • a stack is a last in, first out (LIFO) abstract data type and Data structure In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently .Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks... A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top
  • 6. The basic operations that can be performed on stack: • Push: The process of adding a new element of top of the stack is called push operation. Pushing an element In the stack invoke adding of element, as the new element will be inserted at the top after every push operation the top is incremented by one. In case the array is full and no new element can be accommodated ,it is called stack full condition . This condition is called stack overflow.
  • 7. Pop: the process of deleting an element from the Top of the stack is called pop operation. After every pop operation the stack is decrement by one. If there is no element on the stack and the pop is performed then this will result into stack underflow condition.
  • 8. • A common model of a stack is plates in a marriage party or coin stacker. Fresh plate are “pushed” onto to the top and “popped ” from the top.
  • 9. Stack implementation Stacks static array dynamic arrays Graphical region Parenthesis fill checker
  • 10. Stack implementation in two way: • Static implementation: these implementation uses arrays to create stack. Static implementation though a very simple technique but is not a flexible way of creation as the size of stack has to be declared during program design after that can not be varied. Static implementation is not too efficient with respect to memory utilization. • Dynamic implementation: these implementation is also called link list implementation and uses pointer to implement the stack type of data structure.
  • 11. Stack Applications • A Palindrome is a string that reads the same in either direction – Examples: “Able was I ere I saw Elba” • Reversing the string • Implementation of DFS - a stack is the proper data structure to remember the current node and how to backtrack.
  • 12. Calculation of arithmetic notation • Infix notation: the infix notetion is what we come across our general mathematics, where the opereter is written in between the operand. Example: A+B • prefix notation: the prefix notation a notation in which the operators is written before the operand, it is also called polish notation. Example: +AB • Postfix notation: in the postfix notation the operators are written after the operands, so it’s called the postfix notation’ it’s also called suffix notation. Example :AB+