Stack Data Structure: Stack Introduction Implementation in Python
Stack Data Structure: Stack Introduction Implementation in Python
BY-KANCHAN JAIN
SHE ARISE PYTHON BATCH-1
WHAT IS STACK?
*Stack is a linear data structure which
follows a particular order in which the
operations are performed.
*The order may be LIFO(Last In First
Out) or FILO(First In Last Out).
*Top is that element which has been
inserted at last and can be retrieved first.
We can't access any element except top.
* It is useful when we want to solve the
problem of o(n^2) in o(n).
OPERATIONS PERFORM
ON STACKS
Mainly the following four basic operations
are performed in the stack: