0% found this document useful (0 votes)
7 views9 pages

Data Structure Presentation

Uploaded by

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

Data Structure Presentation

Uploaded by

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

Presentation On

Stack

Team Members
Mahmudul Hasan 221-15-4732
Safat Ahmed Siam 221-15-5958
K.M.Nure Tanvir Siddique 221-15-5223
Md. Abul Hasnat Zilan 221-15-5745
Stacks: A LIFO Data Structure
In this presentation, we will explore the concept of
stacks, a fundamental data structure in computer
science. Stacks follow the LIFO (Last In, First Out)
principle, similar to a stack of plates where you
remove the plate you added last. We will discuss
their operations, implementations, and real-world
applications.
What is a Stack?

• A linear data structure


• Operates in LIFO (Last In, First
Out) order
• Elements are added and
removed from one end, called
the "top"
• Only the top element is
accessible at any given time
Stack Operations

• Push: Adds an
element to the top of
the stack
• Pop: Removes and
returns the top
element from the
stack
• Peek: Returns the
value of the top
element without
removing it
Stack Implementations

• Array: A fixed-size array can be used to implement


a stack. A pointer keeps track of the top element's
position.
• Linked List: A linked list offers a more dynamic
solution. Nodes are added or removed at the
beginning, mimicking the stack behavior.
Real-World
Applications of
Stacks
• Function Calls: Stacks are
used by computer programs to
keep track of function calls.
Each function call creates a new
stack frame that stores local
variables and return addresses.
• Browser History: Web
browsers use stacks to maintain
the browsing history. Pushing a
new URL onto the stack adds a
new page to the history, and
popping removes the current
page when navigating back.
Real-World Applications of
Stacks

• Expression Evaluation: Stacks are used to


evaluate expressions in postfix notation.
Operators and operands are pushed onto the
stack, and the stack operations mimic the
expression evaluation order.
• Undo/Redo Functionality: Many software
applications utilize stacks to implement undo
and redo features. Pushing an action onto the
stack allows you to undo it later, and popping
allows you to redo the action.
Conclusion

1. Simple and easy to understand data


structure
2. Efficient for LIFO operations (push, pop,
peek)
3. Versatile with a wide range of applications
Thank you

You might also like