Stack Abstract Data Type
A Stack Abstract Data Type is an collection abstract data type that supports a push operation and pop operation.
- AKA: Stack ADT.
- Context:
- It can be instantiated in a Stack Data Structure.
- Example(s):
- as used in a Push-Down Automata.
- …
- Counter-Example(s):
- See: LIFO, FILO, Peek (Data Type Operation), Stack Overflow.
References
2013
- (Wikipedia, 2013) ⇒ http://en.wikipedia.org/wiki/Stack_(abstract_data_type) Retrieved:2013-12-1.
- Template:Cleanup
, or more abstractly a sequential collection, the push and pop operations occur only at one end of the structure, referred to as the top of the stack. Often a peek or top operation is also implemented, returning the value of the top element without removing it.
A stack may be implemented to have a bounded capacity. If the stack is full and does not contain enough space to accept an entity to be pushed, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items or results in an empty stack, but, if the stack is empty, it goes into underflow state, which means no items are present in stack to be removed.
A stack is a restricted data structure, because only a small number of operations are performed on it. The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition. Therefore, the lower elements are those that have been on the stack the longest. [1]
- Template:Cleanup
- ↑ http://www.cprogramming.com/tutorial/computersciencetheory/stack.html cprogramming.com