| |
The Stack Abstract Data Type | page 3 of 6 |
A stack is a linear data structure, with each node or cell holding the same data type.
All additions to and deletions from a stack occur at the top of the stack. The last item pushed onto the stack will be the first item removed. A stack is sometimes referred to as a LIFO structure, which stands for Last-In, First-Out.
Two of the more important stack operations involve pushing data onto a stack and popping data off the stack.
The push operation will look like this:

Push Operation
The pop operation will look like this:

Pop Operation
|