SlideShare uma empresa Scribd logo
1 de 8
Stack Data Structure By : Imam M Shofi
What is stack? ,[object Object],[object Object],[object Object],[object Object],stack of satay stack of CDs
Stacks operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Illustration/example ,[object Object],Stack’s contents TOP value 1. Initialiaze(S) <empty> 0 2. Push(‘a’,S) a 1 3. Push(‘b’,S) a b 2 4. Push(‘c’,S) a b c 3 5. Pop(S) a b 2 6. Push(‘d’,S) a b d 3 7. Push(‘e’,S) a b d e 4 8. Pop(S) a b d 3 9. Pop(S) a b 2 10. Pop(S) a 1
Exercise ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],(a) create stack push A onto stack push C*C onto stack pop item from stack and store in B push B+A onto stack pop item from stack and store in A pop item from stack and store in B (b) create stack push B onto stack push C onto stack push A onto stack A=B*C push A+C onto stack pop item from stack and store in A pop item from stack and store in B pop item from stack and store in C
Converting between notations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Converting between notations(2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise: Converting ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Stacks Implementation and Examples
Stacks Implementation and ExamplesStacks Implementation and Examples
Stacks Implementation and Examples
greatqadirgee4u
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
vaibhav2910
 

Mais procurados (20)

STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Stacks
StacksStacks
Stacks
 
Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions Conversion of Infix To Postfix Expressions
Conversion of Infix To Postfix Expressions
 
Stacks
StacksStacks
Stacks
 
Stack
StackStack
Stack
 
Stacks
StacksStacks
Stacks
 
Stacks in DATA STRUCTURE
Stacks in DATA STRUCTUREStacks in DATA STRUCTURE
Stacks in DATA STRUCTURE
 
stack presentation
stack presentationstack presentation
stack presentation
 
Stack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADTStack and its Applications : Data Structures ADT
Stack and its Applications : Data Structures ADT
 
Stack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptxStack_Application_Infix_Prefix.pptx
Stack_Application_Infix_Prefix.pptx
 
Stacks Implementation and Examples
Stacks Implementation and ExamplesStacks Implementation and Examples
Stacks Implementation and Examples
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
 
Application of Stacks
Application of StacksApplication of Stacks
Application of Stacks
 
Project of data structure
Project of data structureProject of data structure
Project of data structure
 
Unit 3 stack
Unit   3 stackUnit   3 stack
Unit 3 stack
 
Data structure Stack
Data structure StackData structure Stack
Data structure Stack
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
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
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 

Destaque

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
 
data structure, stack, stack data structure
data structure, stack, stack data structuredata structure, stack, stack data structure
data structure, stack, stack data structure
pcnmtutorials
 
Algoritma dan Pemrograman C++ (Percabangan)
Algoritma dan Pemrograman C++ (Percabangan)Algoritma dan Pemrograman C++ (Percabangan)
Algoritma dan Pemrograman C++ (Percabangan)
Nabil Muhammad Firdaus
 
MeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich pictureMeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich picture
MeTApresents
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720
Thomas Callaghan
 
CPI Rich Picture
CPI Rich Picture CPI Rich Picture
CPI Rich Picture
Hossam El-Shazly
 

Destaque (20)

Data Structure (Stack)
Data Structure (Stack)Data Structure (Stack)
Data Structure (Stack)
 
Stack Data structure
Stack Data structureStack Data structure
Stack Data structure
 
Stack a Data Structure
Stack a Data StructureStack a Data Structure
Stack a Data Structure
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Stack Applications
Stack ApplicationsStack Applications
Stack Applications
 
Stacks
StacksStacks
Stacks
 
data structure, stack, stack data structure
data structure, stack, stack data structuredata structure, stack, stack data structure
data structure, stack, stack data structure
 
Stack Data Structre Introduction and source code
Stack Data Structre Introduction and source codeStack Data Structre Introduction and source code
Stack Data Structre Introduction and source code
 
Algoritma dan Pemrograman C++ (Percabangan)
Algoritma dan Pemrograman C++ (Percabangan)Algoritma dan Pemrograman C++ (Percabangan)
Algoritma dan Pemrograman C++ (Percabangan)
 
It 405 materi 2 java dasar
It 405 materi 2   java dasarIt 405 materi 2   java dasar
It 405 materi 2 java dasar
 
Viisio based rich picture version 2.0
Viisio based rich picture version 2.0Viisio based rich picture version 2.0
Viisio based rich picture version 2.0
 
Career Hub Rich Picture
Career Hub Rich PictureCareer Hub Rich Picture
Career Hub Rich Picture
 
MeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich pictureMeTA MSP workshop: Issues and challenges: Rich picture
MeTA MSP workshop: Issues and challenges: Rich picture
 
Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720Rich_Picture--IA_Manager.220131720
Rich_Picture--IA_Manager.220131720
 
Program design techniques
Program design techniquesProgram design techniques
Program design techniques
 
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...AN UPDATED REVIEW ON THE  CONVENTIONAL AND UNCONVENTIONAL  RICH PICTURE BUILD...
AN UPDATED REVIEW ON THE CONVENTIONAL AND UNCONVENTIONAL RICH PICTURE BUILD...
 
CPI Rich Picture
CPI Rich Picture CPI Rich Picture
CPI Rich Picture
 
Data Structures - Lecture 5 [Stack]
Data Structures - Lecture 5 [Stack]Data Structures - Lecture 5 [Stack]
Data Structures - Lecture 5 [Stack]
 
Linux vs. Windows
Linux vs. WindowsLinux vs. Windows
Linux vs. Windows
 
Linux vs windows
Linux vs windowsLinux vs windows
Linux vs windows
 

Semelhante a Stack Data Structure V1.0

Lec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptxLec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptx
haaamin01
 
computer notes - Data Structures - 6
computer notes - Data Structures - 6computer notes - Data Structures - 6
computer notes - Data Structures - 6
ecomputernotes
 
Write a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdfWrite a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdf
mohdjakirfb
 

Semelhante a Stack Data Structure V1.0 (20)

Stack
StackStack
Stack
 
Unit 3 stack
Unit 3   stackUnit 3   stack
Unit 3 stack
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 
Stacks.ppt
Stacks.pptStacks.ppt
Stacks.ppt
 
Data Structure and Algorithms Stacks
Data Structure and Algorithms StacksData Structure and Algorithms Stacks
Data Structure and Algorithms Stacks
 
Stack
StackStack
Stack
 
Stack - Data Structure - Notes
Stack - Data Structure - NotesStack - Data Structure - Notes
Stack - Data Structure - Notes
 
Data structures
Data structures Data structures
Data structures
 
Lec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptxLec5-Stack-bukc-28022024-112316am (1) .pptx
Lec5-Stack-bukc-28022024-112316am (1) .pptx
 
Data structures stacks
Data structures   stacksData structures   stacks
Data structures stacks
 
computer notes - Data Structures - 6
computer notes - Data Structures - 6computer notes - Data Structures - 6
computer notes - Data Structures - 6
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
Stack
StackStack
Stack
 
DS1.pptx
DS1.pptxDS1.pptx
DS1.pptx
 
13 Stacks and Queues.pptx
13 Stacks and Queues.pptx13 Stacks and Queues.pptx
13 Stacks and Queues.pptx
 
stacks and queues
stacks and queuesstacks and queues
stacks and queues
 
Stack
StackStack
Stack
 
Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)Data structure and algorithm.(dsa)
Data structure and algorithm.(dsa)
 
Write a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdfWrite a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdf
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manual
 

Mais de Zidny Nafan (6)

Materi 4 Information System Engineering Sim 1223511116853894 8
Materi 4 Information System Engineering Sim 1223511116853894 8Materi 4 Information System Engineering Sim 1223511116853894 8
Materi 4 Information System Engineering Sim 1223511116853894 8
 
Kuliah1 Struktur Data V1.0
Kuliah1 Struktur Data V1.0Kuliah1 Struktur Data V1.0
Kuliah1 Struktur Data V1.0
 
Stack Implementation
Stack ImplementationStack Implementation
Stack Implementation
 
List Data Structure
List Data StructureList Data Structure
List Data Structure
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
Java Greenfator
Java GreenfatorJava Greenfator
Java Greenfator
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Stack Data Structure V1.0