SlideShare ist ein Scribd-Unternehmen logo
1 von 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]

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Stack Data Structure V1.0