The Stack ADT - Jones & Bartlett Learning

3.1 Stacks | 161 1. Another common approach is to define a popoperation in the classical way—that is, it removes and returns the top element—and to define another operation, often called peek, that simply returns the top ele- ment. A stack may be considered “ordered” because elements occur in sequence according ................
................