stack
Table of Contents
1. Introduction
A stack in programming is a data structure that satisfies the following API rules:
- Push: puts something on the top of the stack
- Pop: takes item off stack and gives it to the caller
- Peek: hands copy of top item on the stack to caller
- isEmpty: checks if the stack size is zero
where stacks generally store their data in a list, either an array or a singly linked list.