0% found this document useful (0 votes)
35 views18 pages

Data Structure Stack

The presentation discusses data structures, specifically focusing on stacks, which are linear structures that operate on a Last-In-First-Out (LIFO) principle. It explains stack operations such as 'push' for adding elements and 'pop' for removing elements, along with practical examples like stacks of coins and plates. Additionally, it highlights the importance of stacks in various applications, including undo/redo operations and browser navigation.

Uploaded by

pvermaa1432
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views18 pages

Data Structure Stack

The presentation discusses data structures, specifically focusing on stacks, which are linear structures that operate on a Last-In-First-Out (LIFO) principle. It explains stack operations such as 'push' for adding elements and 'pop' for removing elements, along with practical examples like stacks of coins and plates. Additionally, it highlights the importance of stacks in various applications, including undo/redo operations and browser navigation.

Uploaded by

pvermaa1432
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

CLASS

PRESENTATION

Presented By:
Swati Srivastava
PGT(Computer Science)
Kendriya Vidyalaya Barabanki
Lucknow Region
Data Structure
Data Structure
Data Structure
Stack Operation

Linear Structure
LIFO Technique
Stack Terms

Introduction
User-Defined
Built-in (Simple)
(Complex)

List Dictionary Tuple Set Linear Non –Linear

Linked
Stack Queue Tree Graph
List
Stack is a Linear data structure.
Linear Structure
LIFO Technique
Stack Operation
Stack Terms

Introduction
In stack addition of new data item and deletion
of already existing data item is done from only
one end, known as top.

Working of stack on the basis of Last-in-First-


out (LIFO) principal, it means last entered item
remove first.
Linear Structure
Stack Operation
LIFO Technique  Stack of coins.

Introduction
Stack Terms
 Stack of Plates.
 Stack of Folded Clothes.
 Stack of Boxes.

 Undo/Redo Operations.
 Function Call.
 Back/Forward stacks on Browser.
Stack Operation
Stack Terms

LIFO Technique
Linear Structure
Introduction
Linear Structure
LIFO Technique
Stack Operation

Stack Terms

Introduction
 Getting the most recent value
of stack i.e. value at top.

 A situation when we are pushing


an element in stack that is full.

 A situation when we are popping


an element from stack that is empty.
 In case of insertion of any element in

Linear Structure
LIFO Technique
stack is called push.

Stack Operation
Stack Terms

Introduction
 In case of deletion of any element from
stack is called pop.
In case of insertion and deletion of an element in a stack there are two
functions-
 This function insert an element in stack.
Syntax: stackname.append()
 This function delete an element from stack.
Syntax: stackname.pop(index)
 Delete element at given index.
Syntax: stackname.pop()
 Delete last element.
THANKS!

You might also like