Stack definition
Stack is a linear data Structure in which a list of element may be insert or delete only one end know as top of the stack.It describe arrange operation that is first in last out or last in first out.There are two basic operation use in the stack.
Operation of stack
- Push operation
- Pop operation
Push operation
Enter new element in to a stack.
Pop operation
Delete an element from a stack.
The another operation define in stack know as peep which describe overflow & underflow condition occure in the stack.
Example for stack
Q.5,6,2,+,*,12,4,/,3,-?
Sol. 5 6/5 2/6/5 8/5 40 12/40 4/12/40 3/40 37.
Stack define the three type of notation
a. IN-FIX (A+B)
b. PRE-FIX (+AB)
c. POST-FIX (AB+)
Nice
ReplyDelete