SlideShare una empresa de Scribd logo
1 de 16
Stack Y S N L Srihari
Introduction on Stack ,[object Object],[object Object],[object Object],[object Object]
Operations on Stack ,[object Object],[object Object],[object Object]
Working procedure of a stack ,[object Object],[object Object]
Stack using arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Push code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pop code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Diagrammatical representation of Stack   20 10 30 50 Inserting position Removing position
Push and Pop operations Push an element ’45’ into stack Pop an element ’45’ from stack 20 10 30 50 45 20 10 30 50 45 20 10 30 50 45
Stack using linked list ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Push algorithm using linked list ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pop algorithm using linked list
Example:  Data Address link 10 * 20 * 30 * 40 NULL Top
Push operation:  10 * 20 * 30 * 40 NULL Top New node  45 Null Before Push:  45 Null 10 * 20 * 30 * 40 * Top Step 1:  Step 2:  45 Null 10 * 20 * 30 * 40 * Top
Push operation:  Before Pop:  45 Null 10 * 20 * 30 * 40 Null Top Step 2:  Step 1:  45 Null 10 * 20 * 30 * 40 * Top Temp
Applications of Stack ,[object Object],[object Object],[object Object],[object Object]
[object Object],Applications of Stack

Más contenido relacionado

La actualidad más candente

Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
vaibhav2910
 
Stacks overview with its applications
Stacks overview with its applicationsStacks overview with its applications
Stacks overview with its applications
Saqib Saeed
 
Stack data structure
Stack data structureStack data structure
Stack data structure
Tech_MX
 

La actualidad más candente (20)

Stack - Data Structure
Stack - Data StructureStack - Data Structure
Stack - Data Structure
 
Introduction to stack
Introduction to stackIntroduction to stack
Introduction to stack
 
Stack a Data Structure
Stack a Data StructureStack a Data Structure
Stack a Data Structure
 
Stack
StackStack
Stack
 
stack presentation
stack presentationstack presentation
stack presentation
 
single linked list
single linked listsingle linked list
single linked list
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
 
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 Data Structures - Lecture 9 [Stack & Queue using Linked List] Data Structures - Lecture 9 [Stack & Queue using Linked List]
Data Structures - Lecture 9 [Stack & Queue using Linked List]
 
Stacks
StacksStacks
Stacks
 
Data structure Stack
Data structure StackData structure Stack
Data structure Stack
 
Data Structure (Stack)
Data Structure (Stack)Data Structure (Stack)
Data Structure (Stack)
 
Stacks overview with its applications
Stacks overview with its applicationsStacks overview with its applications
Stacks overview with its applications
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
 
Linked List
Linked ListLinked List
Linked List
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURESTACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Prefix, Infix and Post-fix Notations
Prefix, Infix and Post-fix NotationsPrefix, Infix and Post-fix Notations
Prefix, Infix and Post-fix Notations
 
Ppt on Linked list,stack,queue
Ppt on Linked list,stack,queuePpt on Linked list,stack,queue
Ppt on Linked list,stack,queue
 

Destacado

Costa Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico DosCosta Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico Dos
Andrea Marie Portugal
 
Costa Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico DosCosta Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico Dos
Andrea Marie Portugal
 
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
Karthik Srinivasan
 
2011 Trust Barometer India_Deck - Edelman India
2011 Trust Barometer India_Deck - Edelman India2011 Trust Barometer India_Deck - Edelman India
2011 Trust Barometer India_Deck - Edelman India
Karthik Srinivasan
 
Les forces són vectors
Les forces són vectorsLes forces són vectors
Les forces són vectors
jghidalgo
 
Food Activities
Food ActivitiesFood Activities
Food Activities
sakuras
 
Moii Fla
Moii FlaMoii Fla
Moii Fla
Flavien
 
プレゼンテーション1
プレゼンテーション1プレゼンテーション1
プレゼンテーション1
kaaaa
 

Destacado (16)

Costa Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico DosCosta Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico Dos
 
Costa Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico DosCosta Rica Invest - Finca di Pacifico Dos
Costa Rica Invest - Finca di Pacifico Dos
 
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
Future of Reputation - Presentation by Karthik Srinivasan, for IndiaSocial 2012
 
2011 Trust Barometer India_Deck - Edelman India
2011 Trust Barometer India_Deck - Edelman India2011 Trust Barometer India_Deck - Edelman India
2011 Trust Barometer India_Deck - Edelman India
 
Bible
BibleBible
Bible
 
Mkt preu
Mkt preuMkt preu
Mkt preu
 
Automatic Text Blog Registration and Tracking
Automatic Text Blog Registration and TrackingAutomatic Text Blog Registration and Tracking
Automatic Text Blog Registration and Tracking
 
Les forces són vectors
Les forces són vectorsLes forces són vectors
Les forces són vectors
 
Food Activities
Food ActivitiesFood Activities
Food Activities
 
Moii Fla
Moii FlaMoii Fla
Moii Fla
 
How to Automatic Register the Images you Upload to Flickr in Safe Creative
How to Automatic Register the Images you Upload to Flickr in Safe Creative How to Automatic Register the Images you Upload to Flickr in Safe Creative
How to Automatic Register the Images you Upload to Flickr in Safe Creative
 
Dla Piper Roundtable
Dla Piper RoundtableDla Piper Roundtable
Dla Piper Roundtable
 
Church
ChurchChurch
Church
 
プレゼンテーション1
プレゼンテーション1プレゼンテーション1
プレゼンテーション1
 
Gods Creation
Gods CreationGods Creation
Gods Creation
 
Ética y ciencia: ¿Aborto?
Ética y ciencia: ¿Aborto?Ética y ciencia: ¿Aborto?
Ética y ciencia: ¿Aborto?
 

Similar a Stack

Objectives- In this lab- students will practice- 1- Stack with single.pdf
Objectives- In this lab- students will practice- 1- Stack with single.pdfObjectives- In this lab- students will practice- 1- Stack with single.pdf
Objectives- In this lab- students will practice- 1- Stack with single.pdf
Augstore
 
Stack linked list
Stack linked listStack linked list
Stack linked list
bhargav0077
 

Similar a Stack (20)

Stack data structure
Stack data structureStack data structure
Stack data structure
 
DSA- Unit III- STACK AND QUEUE
DSA- Unit III- STACK AND QUEUEDSA- Unit III- STACK AND QUEUE
DSA- Unit III- STACK AND QUEUE
 
04 stacks
04 stacks04 stacks
04 stacks
 
stacks and queues
stacks and queuesstacks and queues
stacks and queues
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
 
chapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdfchapter8-stack-161018120225.pdf
chapter8-stack-161018120225.pdf
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Objectives- In this lab- students will practice- 1- Stack with single.pdf
Objectives- In this lab- students will practice- 1- Stack with single.pdfObjectives- In this lab- students will practice- 1- Stack with single.pdf
Objectives- In this lab- students will practice- 1- Stack with single.pdf
 
Ds
DsDs
Ds
 
Stack in Data Structure
Stack in Data StructureStack in Data Structure
Stack in Data Structure
 
VCE Unit 03vv.pptx
VCE Unit 03vv.pptxVCE Unit 03vv.pptx
VCE Unit 03vv.pptx
 
unit 5 stack & queue.ppt
unit 5 stack & queue.pptunit 5 stack & queue.ppt
unit 5 stack & queue.ppt
 
Data structure lab manual
Data structure lab manualData structure lab manual
Data structure lab manual
 
Stack linked list
Stack linked listStack linked list
Stack linked list
 
Difference between stack and queue
Difference between stack and queueDifference between stack and queue
Difference between stack and queue
 
Stack - Operations and Applications
Stack - Operations and ApplicationsStack - Operations and Applications
Stack - Operations and Applications
 
Lect 15-16 Zaheer Abbas
Lect 15-16 Zaheer  AbbasLect 15-16 Zaheer  Abbas
Lect 15-16 Zaheer Abbas
 
Stack and its operations
Stack and its operationsStack and its operations
Stack and its operations
 
Chapter 5-stack.pptx
Chapter 5-stack.pptxChapter 5-stack.pptx
Chapter 5-stack.pptx
 
STACK1.pptx
STACK1.pptxSTACK1.pptx
STACK1.pptx
 

Último

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 

Stack

  • 1. Stack Y S N L Srihari
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Diagrammatical representation of Stack 20 10 30 50 Inserting position Removing position
  • 9. Push and Pop operations Push an element ’45’ into stack Pop an element ’45’ from stack 20 10 30 50 45 20 10 30 50 45 20 10 30 50 45
  • 10.
  • 11.
  • 12. Example: Data Address link 10 * 20 * 30 * 40 NULL Top
  • 13. Push operation: 10 * 20 * 30 * 40 NULL Top New node 45 Null Before Push: 45 Null 10 * 20 * 30 * 40 * Top Step 1: Step 2: 45 Null 10 * 20 * 30 * 40 * Top
  • 14. Push operation: Before Pop: 45 Null 10 * 20 * 30 * 40 Null Top Step 2: Step 1: 45 Null 10 * 20 * 30 * 40 * Top Temp
  • 15.
  • 16.