What is stack

– Stack is a linear data structure.
– It stores data in LIFO (Last in First Out) manner.
– Insertion and Deletion take place at one end.
Stack allows following operations:
– Push- new data element is added at the top of stack
– Pop- data element is removed from the top of the stack
– Peek- displaying topmost element of stack without removing it
– Display – displaying all elements of stack

error: Content is protected !!