Basics of Stack Data Structure

Stack is an abstract, linear Data Structure that follows Last-In-First-Out (LIFO) principle. All data operations are done at the top of the stack which means, the last item inserted is first accessible. Insertions in stack are called “PUSH” and deletions are