SlideShare a Scribd company logo
3
Stack
➢ Stack is a linear data structure in which all additions and deletions are restricted
one end, called the top.
➢ If you insert a data series into a stack and then remove it, the order of the data is
revered. Data input as {5,10,15,20} is removed as {20,15,10,5}.
➢ This reversing attribute is why stacks are known as the LIFO (Last In First Out)
data structure.
➢ There are many real-life examples of a stack. Consider an example of plates
stacked over one another in the canteen. The plate which is at the top is the first
one to be removed, So, it can be simply seen to follow LIFO (Last In First Out)
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Most read
4
Continue….
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Most read
5
Basic Operations on Stack
➢ push() : To insert an element into the stack. If the stack is full, then it is said to be
an Overflow condition.
➢ pop() : To remove an element from the stack. If the stack is empty, then it is said
to be an Underflow condition.
➢ top() : Returns the top element of the stack.
➢ isEmpty() : Returns true if stack is empty else false.
➢ size() : Returns the size of stack.
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Most read
ESIT137: Fundamentals of Data Structure
Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423603
(An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Information Technology
(UG Programme - NBAAccredited)
Dr. M.A. Jawale
Professor and Head, Dept. of IT
Stack & Queue
➢ Stack
▪ Introduction to Stack,
▪ Stack ADT,
▪ Implementation of Stack using array,
▪ Concept of implicit and explicit stack.
➢ References
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Stack
➢ Stack is a linear data structure in which all additions and deletions are restricted
one end, called the top.
➢ If you insert a data series into a stack and then remove it, the order of the data is
revered. Data input as {5,10,15,20} is removed as {20,15,10,5}.
➢ This reversing attribute is why stacks are known as the LIFO (Last In First Out)
data structure.
➢ There are many real-life examples of a stack. Consider an example of plates
stacked over one another in the canteen. The plate which is at the top is the first
one to be removed, So, it can be simply seen to follow LIFO (Last In First Out)
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Continue….
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Basic Operations on Stack
➢ push() : To insert an element into the stack. If the stack is full, then it is said to be
an Overflow condition.
➢ pop() : To remove an element from the stack. If the stack is empty, then it is said
to be an Underflow condition.
➢ top() : Returns the top element of the stack.
➢ isEmpty() : Returns true if stack is empty else false.
➢ size() : Returns the size of stack.
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Implementation of Stack
➢ The basic operations that can be performed on a stack include push, pop, and top.
➢ There are two ways to implement a stack:
▪ Using array
▪ Using linked list
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
Reference
1. Richard F. Gilberg & Behrouz A. Forouzan, “Data Structures: A Pseudocode
Approach with C, Second Edition”, Cengage Learning.
2. Ellis Horowitz, Sartaj Sahani, Susan Anderson-Freed “Fundamentals of Data
Structures in C”, Universities Press, 2008.
Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology

More Related Content

What's hot (20)

ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
prasadmutkule1
 
Unit 1- Python- Features, Variables, Data Types, Operators and Expressions
Unit 1- Python- Features, Variables, Data Types, Operators and ExpressionsUnit 1- Python- Features, Variables, Data Types, Operators and Expressions
Unit 1- Python- Features, Variables, Data Types, Operators and Expressions
GawaliSwapnali13
 
list.pptx
list.pptxlist.pptx
list.pptx
SwapnaliGawali5
 
ESIT135 : Unit 1 Python Basics Concepts
ESIT135 : Unit 1 Python Basics  ConceptsESIT135 : Unit 1 Python Basics  Concepts
ESIT135 : Unit 1 Python Basics Concepts
SwapnaliGawali5
 
ESIT135: Unit 3 Topic: functions in python
ESIT135: Unit 3 Topic: functions in pythonESIT135: Unit 3 Topic: functions in python
ESIT135: Unit 3 Topic: functions in python
SwapnaliGawali5
 
JAVASRIPT and PHP (Hypertext Preprocessor)
JAVASRIPT and PHP (Hypertext Preprocessor)JAVASRIPT and PHP (Hypertext Preprocessor)
JAVASRIPT and PHP (Hypertext Preprocessor)
shelakenitinit
 
Unit-4 Basic Concepts of Tuple in Python .pptx
Unit-4 Basic Concepts of Tuple in Python .pptxUnit-4 Basic Concepts of Tuple in Python .pptx
Unit-4 Basic Concepts of Tuple in Python .pptx
SwapnaliGawali5
 
Unit4-Basic Concepts and methods of Dictionary.pptx
Unit4-Basic Concepts and methods of Dictionary.pptxUnit4-Basic Concepts and methods of Dictionary.pptx
Unit4-Basic Concepts and methods of Dictionary.pptx
SwapnaliGawali5
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
skilljiolms
 
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Rubi Veronica Chimal Cuxin
 
Linked list
Linked listLinked list
Linked list
FURQAN M LODHI
 
Stacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti AroraStacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti Arora
kulachihansraj
 
Deletion operation in array(ds)
Deletion operation in array(ds)Deletion operation in array(ds)
Deletion operation in array(ds)
chauhankapil
 
VCE Unit 04vv.pptx
VCE Unit 04vv.pptxVCE Unit 04vv.pptx
VCE Unit 04vv.pptx
skilljiolms
 
deque and it applications
deque and it applicationsdeque and it applications
deque and it applications
Sathasivam Rangasamy
 
DS UNIT 1.pdf
DS UNIT 1.pdfDS UNIT 1.pdf
DS UNIT 1.pdf
SeethaDinesh
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
Tech_MX
 
Different Sorting tecniques in Data Structure
Different Sorting tecniques in Data StructureDifferent Sorting tecniques in Data Structure
Different Sorting tecniques in Data Structure
Tushar Gonawala
 
Double ended queue
Double ended queueDouble ended queue
Double ended queue
jyoti_lakhani
 
Trees in data structures
Trees in data structuresTrees in data structures
Trees in data structures
ASairamSairam1
 
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
ESIT135 Problem Solving Using Python Notes of Unit-2 and Unit-3
prasadmutkule1
 
Unit 1- Python- Features, Variables, Data Types, Operators and Expressions
Unit 1- Python- Features, Variables, Data Types, Operators and ExpressionsUnit 1- Python- Features, Variables, Data Types, Operators and Expressions
Unit 1- Python- Features, Variables, Data Types, Operators and Expressions
GawaliSwapnali13
 
ESIT135 : Unit 1 Python Basics Concepts
ESIT135 : Unit 1 Python Basics  ConceptsESIT135 : Unit 1 Python Basics  Concepts
ESIT135 : Unit 1 Python Basics Concepts
SwapnaliGawali5
 
ESIT135: Unit 3 Topic: functions in python
ESIT135: Unit 3 Topic: functions in pythonESIT135: Unit 3 Topic: functions in python
ESIT135: Unit 3 Topic: functions in python
SwapnaliGawali5
 
JAVASRIPT and PHP (Hypertext Preprocessor)
JAVASRIPT and PHP (Hypertext Preprocessor)JAVASRIPT and PHP (Hypertext Preprocessor)
JAVASRIPT and PHP (Hypertext Preprocessor)
shelakenitinit
 
Unit-4 Basic Concepts of Tuple in Python .pptx
Unit-4 Basic Concepts of Tuple in Python .pptxUnit-4 Basic Concepts of Tuple in Python .pptx
Unit-4 Basic Concepts of Tuple in Python .pptx
SwapnaliGawali5
 
Unit4-Basic Concepts and methods of Dictionary.pptx
Unit4-Basic Concepts and methods of Dictionary.pptxUnit4-Basic Concepts and methods of Dictionary.pptx
Unit4-Basic Concepts and methods of Dictionary.pptx
SwapnaliGawali5
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
skilljiolms
 
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Informe técnico - Métodos de búsqueda Unidad 6 (Rubí Verónica)
Rubi Veronica Chimal Cuxin
 
Stacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti AroraStacks & Queues By Ms. Niti Arora
Stacks & Queues By Ms. Niti Arora
kulachihansraj
 
Deletion operation in array(ds)
Deletion operation in array(ds)Deletion operation in array(ds)
Deletion operation in array(ds)
chauhankapil
 
VCE Unit 04vv.pptx
VCE Unit 04vv.pptxVCE Unit 04vv.pptx
VCE Unit 04vv.pptx
skilljiolms
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
Tech_MX
 
Different Sorting tecniques in Data Structure
Different Sorting tecniques in Data StructureDifferent Sorting tecniques in Data Structure
Different Sorting tecniques in Data Structure
Tushar Gonawala
 
Trees in data structures
Trees in data structuresTrees in data structures
Trees in data structures
ASairamSairam1
 

Similar to Introduction to Stack, ▪ Stack ADT, ▪ Implementation of Stack using array, ▪ Concept of implicit and explicit stack. (20)

What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority QueueWhat is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
Balwant Gorad
 
Stack in C.pptx
Stack in C.pptxStack in C.pptx
Stack in C.pptx
RituSarkar7
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
Rabin BK
 
2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS2.1 STACK & QUEUE ADTS
2.1 STACK & QUEUE ADTS
P. Subathra Kishore, KAMARAJ College of Engineering and Technology, Madurai
 
Stacks.pptx in software engineering in simple understanding
Stacks.pptx in software engineering in simple understandingStacks.pptx in software engineering in simple understanding
Stacks.pptx in software engineering in simple understanding
MohammedAnas871930
 
Data Structures - Lecture 2 - Unit 2.pptx
Data Structures - Lecture 2 - Unit 2.pptxData Structures - Lecture 2 - Unit 2.pptx
Data Structures - Lecture 2 - Unit 2.pptx
DanielNesaKumarC
 
Data Structure
Data Structure Data Structure
Data Structure
Ibrahim MH
 
Stacks and Queue,Concept of Stack,LIFO,Fifo,
Stacks and Queue,Concept of Stack,LIFO,Fifo,Stacks and Queue,Concept of Stack,LIFO,Fifo,
Stacks and Queue,Concept of Stack,LIFO,Fifo,
shaikhdaniyal8603
 
DSA Lab Manual C Scheme.pdf
DSA Lab Manual C Scheme.pdfDSA Lab Manual C Scheme.pdf
DSA Lab Manual C Scheme.pdf
Bharati Vidyapeeth COE, Navi Mumbai
 
STACKS implimentarions AND stack applications .pptx
STACKS implimentarions AND stack applications .pptxSTACKS implimentarions AND stack applications .pptx
STACKS implimentarions AND stack applications .pptx
Dr. Amna Mohamed
 
Stacks in Data Structure
Stacks in Data StructureStacks in Data Structure
Stacks in Data Structure
Lovely Professional University
 
Stacks
StacksStacks
Stacks
Lovely Professional University
 
Data Structures Stack and Queue Data Structures
Data Structures Stack and Queue Data StructuresData Structures Stack and Queue Data Structures
Data Structures Stack and Queue Data Structures
poongothai11
 
Stack and Queue
Stack and QueueStack and Queue
Stack and Queue
Selvaraj Seerangan
 
Stack & Queue
Stack & QueueStack & Queue
Stack & Queue
Hasan Mahadi Riaz
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
Durga Devi
 
Data structure stack&queue basics
Data structure stack&queue   basicsData structure stack&queue   basics
Data structure stack&queue basics
Selvin Josy Bai Somu
 
Stack and its operations, Queue and its operations
Stack and its operations, Queue and its operationsStack and its operations, Queue and its operations
Stack and its operations, Queue and its operations
poongothai11
 
Stacks
StacksStacks
Stacks
Shivam Singh
 
Stack data structure class 12 cbse 2024.pptx
Stack data structure class 12 cbse 2024.pptxStack data structure class 12 cbse 2024.pptx
Stack data structure class 12 cbse 2024.pptx
PradeepVithule
 
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority QueueWhat is Stack, Its Operations, Queue, Circular Queue, Priority Queue
What is Stack, Its Operations, Queue, Circular Queue, Priority Queue
Balwant Gorad
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
Rabin BK
 
Stacks.pptx in software engineering in simple understanding
Stacks.pptx in software engineering in simple understandingStacks.pptx in software engineering in simple understanding
Stacks.pptx in software engineering in simple understanding
MohammedAnas871930
 
Data Structures - Lecture 2 - Unit 2.pptx
Data Structures - Lecture 2 - Unit 2.pptxData Structures - Lecture 2 - Unit 2.pptx
Data Structures - Lecture 2 - Unit 2.pptx
DanielNesaKumarC
 
Data Structure
Data Structure Data Structure
Data Structure
Ibrahim MH
 
Stacks and Queue,Concept of Stack,LIFO,Fifo,
Stacks and Queue,Concept of Stack,LIFO,Fifo,Stacks and Queue,Concept of Stack,LIFO,Fifo,
Stacks and Queue,Concept of Stack,LIFO,Fifo,
shaikhdaniyal8603
 
STACKS implimentarions AND stack applications .pptx
STACKS implimentarions AND stack applications .pptxSTACKS implimentarions AND stack applications .pptx
STACKS implimentarions AND stack applications .pptx
Dr. Amna Mohamed
 
Data Structures Stack and Queue Data Structures
Data Structures Stack and Queue Data StructuresData Structures Stack and Queue Data Structures
Data Structures Stack and Queue Data Structures
poongothai11
 
Stack and its operations, Queue and its operations
Stack and its operations, Queue and its operationsStack and its operations, Queue and its operations
Stack and its operations, Queue and its operations
poongothai11
 
Stack data structure class 12 cbse 2024.pptx
Stack data structure class 12 cbse 2024.pptxStack data structure class 12 cbse 2024.pptx
Stack data structure class 12 cbse 2024.pptx
PradeepVithule
 
Ad

Recently uploaded (20)

Rearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdfRearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Takumi Amitani
 
Fundamentals of Digital Design_Class_12th April.pptx
Fundamentals of Digital Design_Class_12th April.pptxFundamentals of Digital Design_Class_12th April.pptx
Fundamentals of Digital Design_Class_12th April.pptx
drdebarshi1993
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible PavementsPavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdfHow Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
社内勉強会資料_Chain of Thought .
社内勉強会資料_Chain of Thought                           .社内勉強会資料_Chain of Thought                           .
社内勉強会資料_Chain of Thought .
NABLAS株式会社
 
Water demand - Types , variations and WDS
Water demand - Types , variations and WDSWater demand - Types , variations and WDS
Water demand - Types , variations and WDS
dhanashree78
 
Présentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptxPrésentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptx
KHADIJAESSAKET
 
The first edition of the AIAG-VDA FMEA.pptx
The first edition of the AIAG-VDA FMEA.pptxThe first edition of the AIAG-VDA FMEA.pptx
The first edition of the AIAG-VDA FMEA.pptx
Mayank Mathur
 
grade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quizgrade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quiz
norfapangolima
 
TEA2016AAT 160 W TV application design example
TEA2016AAT 160 W TV application design exampleTEA2016AAT 160 W TV application design example
TEA2016AAT 160 W TV application design example
ssuser1be9ce
 
Great power lithium iron phosphate cells
Great power lithium iron phosphate cellsGreat power lithium iron phosphate cells
Great power lithium iron phosphate cells
salmankhan835951
 
Understanding Amplitude Modulation : A Guide
Understanding Amplitude Modulation : A GuideUnderstanding Amplitude Modulation : A Guide
Understanding Amplitude Modulation : A Guide
CircuitDigest
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptxFundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
SharinAbGhani1
 
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.pptCOMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
ravicivil
 
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptxDevelopment of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
aniket862935
 
First Come First Serve Scheduling in real time operating system.pptx
First Come First Serve Scheduling in real time operating system.pptxFirst Come First Serve Scheduling in real time operating system.pptx
First Come First Serve Scheduling in real time operating system.pptx
KavitaBagewadi2
 
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdfRearchitecturing a 9-year-old legacy Laravel application.pdf
Rearchitecturing a 9-year-old legacy Laravel application.pdf
Takumi Amitani
 
Fundamentals of Digital Design_Class_12th April.pptx
Fundamentals of Digital Design_Class_12th April.pptxFundamentals of Digital Design_Class_12th April.pptx
Fundamentals of Digital Design_Class_12th April.pptx
drdebarshi1993
 
Pavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible PavementsPavement and its types, Application of rigid and Flexible Pavements
Pavement and its types, Application of rigid and Flexible Pavements
Sakthivel M
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
How Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdfHow Binning Affects LED Performance & Consistency.pdf
How Binning Affects LED Performance & Consistency.pdf
Mina Anis
 
社内勉強会資料_Chain of Thought .
社内勉強会資料_Chain of Thought                           .社内勉強会資料_Chain of Thought                           .
社内勉強会資料_Chain of Thought .
NABLAS株式会社
 
Water demand - Types , variations and WDS
Water demand - Types , variations and WDSWater demand - Types , variations and WDS
Water demand - Types , variations and WDS
dhanashree78
 
Présentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptxPrésentation_gestion[1] [Autosaved].pptx
Présentation_gestion[1] [Autosaved].pptx
KHADIJAESSAKET
 
The first edition of the AIAG-VDA FMEA.pptx
The first edition of the AIAG-VDA FMEA.pptxThe first edition of the AIAG-VDA FMEA.pptx
The first edition of the AIAG-VDA FMEA.pptx
Mayank Mathur
 
grade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quizgrade 9 science q1 quiz.pptx science quiz
grade 9 science q1 quiz.pptx science quiz
norfapangolima
 
TEA2016AAT 160 W TV application design example
TEA2016AAT 160 W TV application design exampleTEA2016AAT 160 W TV application design example
TEA2016AAT 160 W TV application design example
ssuser1be9ce
 
Great power lithium iron phosphate cells
Great power lithium iron phosphate cellsGreat power lithium iron phosphate cells
Great power lithium iron phosphate cells
salmankhan835951
 
Understanding Amplitude Modulation : A Guide
Understanding Amplitude Modulation : A GuideUnderstanding Amplitude Modulation : A Guide
Understanding Amplitude Modulation : A Guide
CircuitDigest
 
SEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair KitSEW make Brake BE05 – BE30 Brake – Repair Kit
SEW make Brake BE05 – BE30 Brake – Repair Kit
projectultramechanix
 
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptxFundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
 
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-ABB Furse.pdf
djiceramil
 
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
02 - Ethics & Professionalism - BEM, IEM, MySET.PPT
SharinAbGhani1
 
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.pptCOMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
COMPOSITE COLUMN IN STEEL CONCRETE COMPOSITES.ppt
ravicivil
 
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptxDevelopment of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
Development of Portable Biomass Briquetting Machine (S, A & D)-1.pptx
aniket862935
 
First Come First Serve Scheduling in real time operating system.pptx
First Come First Serve Scheduling in real time operating system.pptxFirst Come First Serve Scheduling in real time operating system.pptx
First Come First Serve Scheduling in real time operating system.pptx
KavitaBagewadi2
 
Ad

Introduction to Stack, ▪ Stack ADT, ▪ Implementation of Stack using array, ▪ Concept of implicit and explicit stack.

  • 1. ESIT137: Fundamentals of Data Structure Sanjivani Rural Education Society’s Sanjivani College of Engineering, Kopargaon-423603 (An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune) NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified Department of Information Technology (UG Programme - NBAAccredited) Dr. M.A. Jawale Professor and Head, Dept. of IT
  • 2. Stack & Queue ➢ Stack ▪ Introduction to Stack, ▪ Stack ADT, ▪ Implementation of Stack using array, ▪ Concept of implicit and explicit stack. ➢ References Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
  • 3. Stack ➢ Stack is a linear data structure in which all additions and deletions are restricted one end, called the top. ➢ If you insert a data series into a stack and then remove it, the order of the data is revered. Data input as {5,10,15,20} is removed as {20,15,10,5}. ➢ This reversing attribute is why stacks are known as the LIFO (Last In First Out) data structure. ➢ There are many real-life examples of a stack. Consider an example of plates stacked over one another in the canteen. The plate which is at the top is the first one to be removed, So, it can be simply seen to follow LIFO (Last In First Out) Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
  • 4. Continue…. Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
  • 5. Basic Operations on Stack ➢ push() : To insert an element into the stack. If the stack is full, then it is said to be an Overflow condition. ➢ pop() : To remove an element from the stack. If the stack is empty, then it is said to be an Underflow condition. ➢ top() : Returns the top element of the stack. ➢ isEmpty() : Returns true if stack is empty else false. ➢ size() : Returns the size of stack. Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
  • 6. Implementation of Stack ➢ The basic operations that can be performed on a stack include push, pop, and top. ➢ There are two ways to implement a stack: ▪ Using array ▪ Using linked list Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology
  • 7. Reference 1. Richard F. Gilberg & Behrouz A. Forouzan, “Data Structures: A Pseudocode Approach with C, Second Edition”, Cengage Learning. 2. Ellis Horowitz, Sartaj Sahani, Susan Anderson-Freed “Fundamentals of Data Structures in C”, Universities Press, 2008. Unit-III: Part-I Stack & Queue Dr. Madhuri Jawale Department of Information Technology