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

Weitere ähnliche Inhalte

Was ist angesagt?

Stacks overview with its applications
Stacks overview with its applicationsStacks overview with its applications
Stacks overview with its applications
Saqib Saeed
 

Was ist angesagt? (20)

Stack and Queue
Stack and Queue Stack and Queue
Stack and Queue
 
Queues
QueuesQueues
Queues
 
Stack - Operations and Applications
Stack - Operations and ApplicationsStack - Operations and Applications
Stack - Operations and Applications
 
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
 
Stacks
StacksStacks
Stacks
 
Circular queue
Circular queueCircular queue
Circular queue
 
Data structure Stack
Data structure StackData structure Stack
Data structure Stack
 
Queue Data Structure
Queue Data StructureQueue Data Structure
Queue Data Structure
 
Stack using Array
Stack using ArrayStack using Array
Stack using Array
 
Stacks overview with its applications
Stacks overview with its applicationsStacks overview with its applications
Stacks overview with its applications
 
Queue data structure
Queue data structureQueue data structure
Queue data structure
 
Data structure
Data structureData structure
Data structure
 
Stack - Data Structure
Stack - Data StructureStack - Data Structure
Stack - Data Structure
 
Queue implementation
Queue implementationQueue implementation
Queue implementation
 
Stacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURESStacks IN DATA STRUCTURES
Stacks IN DATA STRUCTURES
 
Applications of stack
Applications of stackApplications of stack
Applications of stack
 
STACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data StructureSTACK ( LIFO STRUCTURE) - Data Structure
STACK ( LIFO STRUCTURE) - Data Structure
 
Queue in Data Structure
Queue in Data Structure Queue in Data Structure
Queue in Data Structure
 
linked lists in data structures
linked lists in data structureslinked lists in data structures
linked lists in data structures
 
Circular link list.ppt
Circular link list.pptCircular link list.ppt
Circular link list.ppt
 

Andere mochten auch

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
 

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

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

Ähnlich wie 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
 
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
 
Data Structure (Stack)
Data Structure (Stack)Data Structure (Stack)
Data Structure (Stack)
 
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
 
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
 
Stack PPT.pptx
Stack PPT.pptxStack PPT.pptx
Stack PPT.pptx
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
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...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
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
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
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
 
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
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.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.