A stack is a list of elements with insertions and deletions at one end.A stack data structure has the LIFO (last in first out) property.