A stack is an abstract data type holding a sequence of elements, with four operations: create an empty stack; test whether it is empty; push an element on top; pop the top element, removing and returning it, which is refused on an empty stack. A fifth, top, returns the top without removing it. The last element pushed is the first popped: the stack is LIFO, last in, first out.
Computer Science · Begrippenlijst
Wat is Stack, push, pop, LIFO?
Ook bekend als: stack · push · pop · LIFO