"A Stack is a restricted ordered sequence in which we can only add to and remove from one end
Ã¢â‚¬â€ The top of the stack. A stack is a linear data structure for collection of items, with the restriction that items can be added one at a time and can only be removed in the reverse order in which they were added. The last item represents the top of the stack. Such a stack resembles a stack of trays in a cafeteria, or stack of boxes. Only the top tray can be removed from the stack and it is the last one that was added to the stack. A tray can be removed only if there are
some trays on the stack, and a tray can be added only if there is enough room to hold more trays.
Read this topic