> For the complete documentation index, see [llms.txt](https://beesec.gitbook.io/algorithms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beesec.gitbook.io/algorithms/strings/stacks.md).

# Stacks

A stack is a type of data structure. Imagine it as a stack of plates. When we take a plate, we take the plate at the top.

When we add a plate, we add it to the top.

First in, first out.

Stacks have 2 operations.

* .append(x) - Appends the item to the top of the stack
* .pop() - Takes the item on the top of the stack&#x20;
