Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- STACKS IN DATASTRUCTURE by Archie Jamwal 8220 views
- Stack by sharmaseema9 12447 views
- Stack data structure by Tech_MX 11691 views
- Stack Data Structure & It's Applica... by Tech_MX 19811 views
- Stacks Implementation and Examples by greatqadirgee4u 30722 views
- Stack Applications by Kulachi Hansraj M... 64182 views

3,044 views

2,699 views

2,699 views

Published on

No Downloads

Total views

3,044

On SlideShare

0

From Embeds

0

Number of Embeds

15

Shares

0

Downloads

138

Comments

0

Likes

1

No embeds

No notes for slide

- 1. Department of ITPresented by- Narendra katariya
- 2. The stack is a very common and non primitive data structure used inprograms. By data structure, I meansomething that is meant to hold data and provides certain operations on that data.
- 3. Abstract definition• A stack is a fundamental computer science data structure and can be defined in an abstract, implementation-free manner,• it can be generally defined as, Stack is a linear list of items in which all additions and deletion are restricted to one end that is Top.
- 4. Examples of stack
- 5. Operations on stack• a stack is a last in, first out (LIFO) abstract data type and Data structure In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently .Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks... A stack can have any abstract data type as an element, but is characterized by only three fundamental operations: push, pop and stack top
- 6. The basic operations that can be performed on stack:• Push: The process of adding a new element of top of the stack is called push operation. Pushing an element In the stack invoke adding of element, as the new element will be inserted at the top after every push operation the top is incremented by one. In case the array is full and no new element can be accommodated ,it is called stack full condition . This condition is called stack overflow.
- 7. Pop: the process of deleting an element from the Top of the stack is called pop operation. After every pop operation the stack is decrement by one. If there is no element on the stack and the pop is performed then this will result into stack underflow condition.
- 8. • A common model of a stack is plates in a marriage party or coin stacker. Fresh plate are “pushed” onto to the top and “popped ” from the top.
- 9. Stack implementation Stacks static array dynamic arrays Graphical regionParenthesis fillchecker
- 10. Stack implementation in two way:• Static implementation: these implementation uses arrays to create stack. Static implementation though a very simple technique but is not a flexible way of creation as the size of stack has to be declared during program design after that can not be varied. Static implementation is not too efficient with respect to memory utilization.• Dynamic implementation: these implementation is also called link list implementation and uses pointer to implement the stack type of data structure.
- 11. Stack Applications• A Palindrome is a string that reads the same in either direction – Examples: “Able was I ere I saw Elba”• Reversing the string• Implementation of DFS - a stack is the proper data structure to remember the current node and how to backtrack.
- 12. Calculation of arithmetic notation• Infix notation: the infix notetion is what we come across our general mathematics, where the opereter is written in between the operand.Example: A+B• prefix notation: the prefix notation a notation in which the operators is written before the operand, it is also called polish notation.Example: +AB• Postfix notation: in the postfix notation the operators are written after the operands, so it’s called the postfix notation’ it’s also called suffix notation.Example :AB+
- 13. Thank you

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment