Explain what is a Stack?

Category: Data StructureExplain what is a Stack?
1 Answers
Editor">Editor Staff answered 2 years ago

Stack is an ordered list in which, insertion and deletion can be performed only at one end that is called the top. It is a recursive data structure having pointer to its top element. The stack is sometimes called as Last-In-First-Out (LIFO) list i.e. the element which is inserted first in the stack will be deleted last from the stack.