Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Computer Science · Glosario

¿Qué es Stack, push, pop, LIFO?

También llamado: stack · push · pop · LIFO

Definition 24.3 High School Computer Science · Capítulo 24 — Linked Lists, Stacks and Queues

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.

A stack before and after one push and one pop. Only the top is reachable; the pop gives back the element of the last push.
A stack before and after one push and one pop. Only the top is reachable; the pop gives back the element of the last push.
Leer en el capítulo →