A Stack is a data structure that holds similar data items. It uses the principle of LIFO (Last in, First out). A stack has two major operations and these are push and pop. The push operation adds elements to the stack and the pop operation removes elements from the stack. Both operations are done from the top of the stack.
A Queue is also a data structure. It uses FIFO (First in First out). Elements are added from the back or the end of the stack and elements are removed from the top of the stack.