Stack

From HandWiki


A programming concept much needed in nested or recursive operations. A stack can be defined as a list of items such that manipulations are done only at the beginning of the list (LIFO = last-in-first-out).

Example: In following a generalized tree structure of data, operations at a given level are suspended when a new, lower level is encountered. The parameters describing the current level are then stacked for later continuation (after lower level operations have been terminated).

The operations of entering/removing items to/from a stack are commonly called pushing and popping. Hepa img1.gif also Maurer77.  also FIFO.