Stack in Data Structure - PowerPoint PPT Presentation

About This Presentation
Title:

Stack in Data Structure

Description:

data structure – PowerPoint PPT presentation

Number of Views:22
Slides: 11
Provided by: sejalj
Category:
Tags:

less

Transcript and Presenter's Notes

Title: Stack in Data Structure


1
DATA STRUCTURE AND ALGORITHMS
  • TOPIC STACK
  • Under Guidance of
  • Prof. Deepti Dave
  • Project Contributors
  • Sejal Jadhav
  • URN- 2020-B-05082002B

2
DATA STRUCTURE
  • A data structure is a particular way of
    organizing data in a computer so that it can be
    used effectively.
  • Example Array we can store a list of items
    having the same data-type using the array data
    structure.

3
CLASSIFICATION OF DATA STRUCTURE
4
LINEAR DATA STRUCTURE
  • A Linear data structure have data elements
    arranged in sequential manner and each member
    element is connected to its previous and next
    element. 
  • Examples of linear data structures are List,
    Queue, Stack, Array etc.

5
STACK
  • Stack is a linear data structure which follows a
    particular order in which the operations
  • are performed.
  • The order may be
  • LIFO(Last In First Out) or
  • FILO(First In Last Out).

6
FIRST IN FIRST OUT (FIFO)
  • It is a method for handling data structures where
    the first element is processed first and
    the newest element is processed last.
  • Real life example

7
LAST IN FIRST OUT(LIFO)
  • It is a method for handling data structures where
    the last element is processed first and the first
    element is processed last.
  • Real life example

8
OPERATIONS THAT CAN BE PERFORMED OF STACK
  • In stack terminology, insertion operation is
    called PUSH operation ,removal operation is
    called POP operation and TOP represents current
    location of data.

TOP
9
APPLICATION OF STACK
  • Infix to Postfix /Prefix conversion
  • Redo-undo features at many places like editors,
    photoshop.
  • Forward and backward feature in web browsers
  • Used in many algorithms like Tower of Hanoi and
    tree traversals
  • Other application can be sudoku solver
  • In Graph Algorithms like Topological
    Sorting and Strongly Connected Components

10
  • THANK YOU
Write a Comment
User Comments (0)
About PowerShow.com