SlideShare a Scribd company logo
1 of 15
Created by  Zaheer Abbas Aghani
LECTURE 15-16 STACK
STACK (DEFINITION) ,[object Object],[object Object],[object Object]
EXAMPLES OF STACK
MORE STACK ,[object Object]
BASIC OPERATIONS WITH STACKS ,[object Object],[object Object],[object Object],[object Object]
Push ,[object Object]
[object Object],Pop
[object Object],Stack Top
CONDITIONS OF STACK ,[object Object],[object Object]
IMPLEMENTING STACK WITH ARRAY ,[object Object],[object Object],[object Object]
ARRAY REPRESENTATION OF STACK ,[object Object],[object Object],[object Object],20 5 10 15 5 10 15
ALGORITHM ( PUSH OPERATION) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ALGORITHM ( POP OPERATION) ,[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot (20)

STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Stack push pop
Stack push popStack push pop
Stack push pop
 
Stack project
Stack projectStack project
Stack project
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Introduction To Stack
Introduction To StackIntroduction To Stack
Introduction To Stack
 
Data structure by Digvijay
Data structure by DigvijayData structure by Digvijay
Data structure by Digvijay
 
Stacks in Data Structure
Stacks in Data StructureStacks in Data Structure
Stacks in Data Structure
 
Stack
StackStack
Stack
 
Data structure Stack
Data structure StackData structure Stack
Data structure Stack
 
stack and queue array implementation in java.
stack and queue array implementation in java.stack and queue array implementation in java.
stack and queue array implementation in java.
 
Stack of Data structure
Stack of Data structureStack of Data structure
Stack of Data structure
 
data structure, stack, stack data structure
data structure, stack, stack data structuredata structure, stack, stack data structure
data structure, stack, stack data structure
 
Stack
StackStack
Stack
 
Stack Data Structure
Stack Data StructureStack Data Structure
Stack Data Structure
 
stack presentation
stack presentationstack presentation
stack presentation
 
Stacks in DATA STRUCTURE
Stacks in DATA STRUCTUREStacks in DATA STRUCTURE
Stacks in DATA STRUCTURE
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Stacks
StacksStacks
Stacks
 
Pop operation
Pop operationPop operation
Pop operation
 

Viewers also liked (8)

Lect 14 Zaheer Abbas
Lect 14 Zaheer AbbasLect 14 Zaheer Abbas
Lect 14 Zaheer Abbas
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Lect 1-2 Zaheer Abbas
Lect 1-2 Zaheer AbbasLect 1-2 Zaheer Abbas
Lect 1-2 Zaheer Abbas
 
Lect 8(pointers) Zaheer Abbas
Lect 8(pointers) Zaheer AbbasLect 8(pointers) Zaheer Abbas
Lect 8(pointers) Zaheer Abbas
 
Lect 10 Zaheer Abbas
Lect 10 Zaheer AbbasLect 10 Zaheer Abbas
Lect 10 Zaheer Abbas
 
Lect 19 Zaheer Abbas
Lect 19 Zaheer AbbasLect 19 Zaheer Abbas
Lect 19 Zaheer Abbas
 
Lect 13 Zaheer Abbas
Lect 13 Zaheer AbbasLect 13 Zaheer Abbas
Lect 13 Zaheer Abbas
 
Lect 17-18 Zaheer Abbas
Lect 17-18 Zaheer AbbasLect 17-18 Zaheer Abbas
Lect 17-18 Zaheer Abbas
 

Similar to Lect 15-16 Zaheer Abbas

Stack PPT.pptx
Stack PPT.pptxStack PPT.pptx
Stack PPT.pptxUzmaRizvi5
 
Operation on stack
Operation on stackOperation on stack
Operation on stackchetan handa
 
Module 2 ppt.pptx
Module 2 ppt.pptxModule 2 ppt.pptx
Module 2 ppt.pptxSonaPathak4
 
Chapter 5 Stack and Queue.pdf
Chapter 5 Stack and Queue.pdfChapter 5 Stack and Queue.pdf
Chapter 5 Stack and Queue.pdfGirT2
 
Presentation topic is stick data structure
Presentation topic is stick data structurePresentation topic is stick data structure
Presentation topic is stick data structureAizazAli21
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stackRavi Khokhar
 
Queues and Stacks
Queues and StacksQueues and Stacks
Queues and StacksProf Ansari
 
Stack operation algorithms with example
Stack operation algorithms with exampleStack operation algorithms with example
Stack operation algorithms with exampleNamanKikani
 
Stack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationStack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationRAtna29
 
Stack operation
Stack operationStack operation
Stack operationAnujRana43
 
In C++ a function used to put data into a stack is typically called a.docx
In C++ a function used to put data into a stack is typically called a.docxIn C++ a function used to put data into a stack is typically called a.docx
In C++ a function used to put data into a stack is typically called a.docxtristans3
 
chapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfchapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfMarlonMagtibay2
 
Stacks Data structure.pptx
Stacks Data structure.pptxStacks Data structure.pptx
Stacks Data structure.pptxline24arts
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptxrupam100
 

Similar to Lect 15-16 Zaheer Abbas (20)

Stack PPT.pptx
Stack PPT.pptxStack PPT.pptx
Stack PPT.pptx
 
Operation on stack
Operation on stackOperation on stack
Operation on stack
 
Module 2 ppt.pptx
Module 2 ppt.pptxModule 2 ppt.pptx
Module 2 ppt.pptx
 
04 stacks
04 stacks04 stacks
04 stacks
 
Chapter 5 Stack and Queue.pdf
Chapter 5 Stack and Queue.pdfChapter 5 Stack and Queue.pdf
Chapter 5 Stack and Queue.pdf
 
Presentation topic is stick data structure
Presentation topic is stick data structurePresentation topic is stick data structure
Presentation topic is stick data structure
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 
Queues and Stacks
Queues and StacksQueues and Stacks
Queues and Stacks
 
Stack operation algorithms with example
Stack operation algorithms with exampleStack operation algorithms with example
Stack operation algorithms with example
 
stacks and queues
stacks and queuesstacks and queues
stacks and queues
 
Stack and its operations
Stack and its operationsStack and its operations
Stack and its operations
 
Stack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparationStack and Queue.pptx university exam preparation
Stack and Queue.pptx university exam preparation
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
 
Stack operation
Stack operationStack operation
Stack operation
 
In C++ a function used to put data into a stack is typically called a.docx
In C++ a function used to put data into a stack is typically called a.docxIn C++ a function used to put data into a stack is typically called a.docx
In C++ a function used to put data into a stack is typically called a.docx
 
chapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfchapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdf
 
Stacks Data structure.pptx
Stacks Data structure.pptxStacks Data structure.pptx
Stacks Data structure.pptx
 
STACK.pptx
STACK.pptxSTACK.pptx
STACK.pptx
 
Ds stacks
Ds stacksDs stacks
Ds stacks
 
Lecture5
Lecture5Lecture5
Lecture5
 

More from Information Technology Center (8)

It3 4 by Zaheer Abbas Aghani
It3 4 by Zaheer Abbas AghaniIt3 4 by Zaheer Abbas Aghani
It3 4 by Zaheer Abbas Aghani
 
Flip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas AghaniFlip & flop by Zaheer Abbas Aghani
Flip & flop by Zaheer Abbas Aghani
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
 
C# by Zaheer Abbas Aghani
C# by Zaheer Abbas AghaniC# by Zaheer Abbas Aghani
C# by Zaheer Abbas Aghani
 
Lect 22 Zaheer Abbas
Lect 22 Zaheer AbbasLect 22 Zaheer Abbas
Lect 22 Zaheer Abbas
 
Lect 21 Zaheer Abbas
Lect 21 Zaheer AbbasLect 21 Zaheer Abbas
Lect 21 Zaheer Abbas
 
Lect 11-12 Zaheer Abbas
Lect 11-12 Zaheer AbbasLect 11-12 Zaheer Abbas
Lect 11-12 Zaheer Abbas
 
Lect 9(pointers) Zaheer Abbas
Lect 9(pointers) Zaheer AbbasLect 9(pointers) Zaheer Abbas
Lect 9(pointers) Zaheer Abbas
 

Lect 15-16 Zaheer Abbas