What is Stack and explain it's basic operations?
Stack comes under one of the types of Data Structure which is Linear Lists in which the data elements are stored sequentially. In Linear lists, the insertions and deletions of the data elements are easier.
Stack follow a "LIFO" rule which means 'Last In First Out' for storing and retrieving the data, i.e., Last data pushed into the stack will come out first.
There are two primary functions of Stack: Push() & Pop() for inserting and removing the data elements from the stack respectively.