首页 > Term: stack
stack
A collection of items in which only the most recently added item may be removed. The latest added item is at the top. Basic operations are push and pop. Often top and isEmpty are available, too. Also known as "last-in, first-out" or LIFO. Formal Definition: The operations new(), push(v, S), top(S), and popoff(S) may be defined with axiomatic semantics as follows.
- new() returns a stack
- popoff(push(v, S)) = S
- top(push(v, S)) = v
0
创建者
- GeorgeV
- 100% positive feedback