5.4.2 How to Use Stacks

The stack is an ordered list of similar type. It is a LIFO structure, which stands for"last in, first out". Meaning the last item in the stack, will be the first item out of the stack.