Stack
lastmod 2018-08-17created 2015-11-112 edits
A stack is a list structure with restricted access. Access always happens only at the end of the list. It is also called a pushdown list.
A stack is a linear structure (LIFO - Last In First Out) in which data can be inserted or removed at only one end. Inserting data is called push, as in "pushing in", and conversely taking stored data out is called pop; the data taken out comes from the most recently stored data first. A structure like this, where the value inserted last comes out first, is called a LIFO structure.
Operators
- push
- pop
- top