What are Stacks in Programming?

Akiko Green
Nerd For Tech
Published in
8 min readFeb 18, 2023

--

images of a stack of pancakes

The best way to think about how to implement a Stack in programming is to visualize a stack of pancakes!

A stack is a linear data structure used for storing data. Visually speaking, a stack is Last In, First Out. Meaning, the last pancake on the plate will be stacked on top. Which will also be the first pancake to be eaten in the stack.

--

--

Akiko Green
Nerd For Tech

Software Engineer, Novice Blogger, Indoor Climbing Cutie 🥰