Stack is a type of linear list in which insertion and deletion of an element takes place at one end. It’s basically work on the principle of LIFO.