SlideShare a Scribd company logo
Saqib Saeed Umair Maqbool Hassan tariq
 
Quick Introduction Stacks are linear lists. All deletions and insertions occur at one end of the stack known as the TOP. Data going into the stack first, leaves out last. Stacks are also known as LIFO data structures ( L ast- I n,  F irst- O ut).
Basic Stack Operations push – Adds an item to the top of a stack. pop – Removes an item from the top of the stack and returns it to the user. stack top (top, peek) – Copies the top item of the stack and returns it to the user; the item is not removed, hence the stack is not altered.
Additional Notes Stacks structures are usually implemented using arrays or linked lists. For both implementations, the running time is O(n). We will be examining common Stack Applications.
Stack Applications Reversing Data: We can use stacks to reverse data. (example: files, strings) Very useful for finding palindromes Converting Decimal to Binary Infix to postfix conversion
Backtracking Stacks can be used to backtrack to achieve certain goals. Usually, we set up backtrack tokens to indicate a backtrack opportunity. Backtracking  in N-Queen problem.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

More Related Content

PDF
STACK ( LIFO STRUCTURE) - Data Structure
PDF
Applications of stack
PPTX
Queue - Data Structure - Notes
PDF
Singly linked list
PPTX
PPTX
Data structure by Digvijay
PDF
PDF
UNIT I LINEAR DATA STRUCTURES – LIST
STACK ( LIFO STRUCTURE) - Data Structure
Applications of stack
Queue - Data Structure - Notes
Singly linked list
Data structure by Digvijay
UNIT I LINEAR DATA STRUCTURES – LIST

What's hot (20)

PPT
Stacks
PPTX
Stacks in DATA STRUCTURE
PPSX
Data Structure (Stack)
PPTX
Presentation on queue
PPTX
Stacks in c++
PPTX
Stack Data Structure
PPT
Queue Data Structure
PPTX
Introduction to stack
PPTX
Stack and its applications
PDF
Polymorphism In Java
PPSX
PPT
Stack application
PPT
PPTX
Conversion of Infix to Prefix and Postfix with Stack
PPTX
Stack - Data Structure
PPTX
single linked list
PPTX
Stacks and Queue - Data Structures
PPTX
Queues in C++
PPTX
Queue
PPTX
Stacks
Stacks in DATA STRUCTURE
Data Structure (Stack)
Presentation on queue
Stacks in c++
Stack Data Structure
Queue Data Structure
Introduction to stack
Stack and its applications
Polymorphism In Java
Stack application
Conversion of Infix to Prefix and Postfix with Stack
Stack - Data Structure
single linked list
Stacks and Queue - Data Structures
Queues in C++
Queue
Ad

Viewers also liked (9)

PPSX
Stacks fundamentals
PPTX
The french revolution
PPT
Application of Stacks
PPSX
Stacks Implementation and Examples
PPTX
Stack data structure
PPT
Stack Data Structure & It's Application
PDF
Stacks queues
PPTX
STACKS IN DATASTRUCTURE
PPTX
Variable Frequency Drives
Stacks fundamentals
The french revolution
Application of Stacks
Stacks Implementation and Examples
Stack data structure
Stack Data Structure & It's Application
Stacks queues
STACKS IN DATASTRUCTURE
Variable Frequency Drives
Ad

Similar to Stacks overview with its applications (20)

PDF
4-Stack --------------------------------in C++.pdf
PDF
Data structure.pdf
PPTX
Data structure Stack
PPTX
Understanding-Stacks read to know about stach.pptx
PPTX
Stacks in Data Structure
PPTX
Stack and its operations
PPTX
Introduction-to-Stack-Instruction.pptxpptppt
PPTX
STACK.pptx
PDF
PPTX
Abscddnddmdkwkkstack implementation.pptx
PPTX
Stack data structure class 12 cbse 2024.pptx
PPTX
Introduction to information about Data Structure.pptx
PPTX
Data structure day3
PPTX
PPTX
Stack PPT.pptx
PPT
PPTX
stack.pptx
DOCX
Stacks in data structure
4-Stack --------------------------------in C++.pdf
Data structure.pdf
Data structure Stack
Understanding-Stacks read to know about stach.pptx
Stacks in Data Structure
Stack and its operations
Introduction-to-Stack-Instruction.pptxpptppt
STACK.pptx
Abscddnddmdkwkkstack implementation.pptx
Stack data structure class 12 cbse 2024.pptx
Introduction to information about Data Structure.pptx
Data structure day3
Stack PPT.pptx
stack.pptx
Stacks in data structure

Recently uploaded (20)

PDF
High Ground Student Revision Booklet Preview
PPTX
Introduction and Scope of Bichemistry.pptx
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
LDMMIA Reiki Yoga S2 L3 Vod Sample Preview
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Types of Literary Text: Poetry and Prose
PDF
Insiders guide to clinical Medicine.pdf
PDF
Landforms and landscapes data surprise preview
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
How to Manage Loyalty Points in Odoo 18 Sales
PPTX
Revamp in MTO Odoo 18 Inventory - Odoo Slides
PPTX
Software Engineering BSC DS UNIT 1 .pptx
PPTX
Onica Farming 24rsclub profitable farm business
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf
High Ground Student Revision Booklet Preview
Introduction and Scope of Bichemistry.pptx
Cardiovascular Pharmacology for pharmacy students.pptx
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Open Quiz Monsoon Mind Game Prelims.pptx
LDMMIA Reiki Yoga S2 L3 Vod Sample Preview
O7-L3 Supply Chain Operations - ICLT Program
Types of Literary Text: Poetry and Prose
Insiders guide to clinical Medicine.pdf
Landforms and landscapes data surprise preview
The Final Stretch: How to Release a Game and Not Die in the Process.
Pharmacology of Heart Failure /Pharmacotherapy of CHF
How to Manage Loyalty Points in Odoo 18 Sales
Revamp in MTO Odoo 18 Inventory - Odoo Slides
Software Engineering BSC DS UNIT 1 .pptx
Onica Farming 24rsclub profitable farm business
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
What Is Coercive Control? Understanding and Recognizing Hidden Abuse
Week 4 Term 3 Study Techniques revisited.pptx
Piense y hagase Rico - Napoleon Hill Ccesa007.pdf

Stacks overview with its applications

  • 1. Saqib Saeed Umair Maqbool Hassan tariq
  • 2.  
  • 3. Quick Introduction Stacks are linear lists. All deletions and insertions occur at one end of the stack known as the TOP. Data going into the stack first, leaves out last. Stacks are also known as LIFO data structures ( L ast- I n, F irst- O ut).
  • 4. Basic Stack Operations push – Adds an item to the top of a stack. pop – Removes an item from the top of the stack and returns it to the user. stack top (top, peek) – Copies the top item of the stack and returns it to the user; the item is not removed, hence the stack is not altered.
  • 5. Additional Notes Stacks structures are usually implemented using arrays or linked lists. For both implementations, the running time is O(n). We will be examining common Stack Applications.
  • 6. Stack Applications Reversing Data: We can use stacks to reverse data. (example: files, strings) Very useful for finding palindromes Converting Decimal to Binary Infix to postfix conversion
  • 7. Backtracking Stacks can be used to backtrack to achieve certain goals. Usually, we set up backtrack tokens to indicate a backtrack opportunity. Backtracking in N-Queen problem.
  • 8.  
  • 9.  
  • 10.  
  • 11.  
  • 12.  
  • 13.  
  • 14.  
  • 15.  
  • 16.  
  • 17.  
  • 18.  
  • 19.  
  • 20.  
  • 21.  
  • 22.  
  • 23.  
  • 24.  
  • 25.  
  • 26.  
  • 27.  
  • 28.  
  • 29.  
  • 30.  
  • 31.  
  • 32.  
  • 33.  
  • 34.  
  • 35.  
  • 36.