What is a Stack?

An introduction to the Stack data structure, its uses, and its functionality.

Introduction #

We are all familiar with the famous Undo option which exists in almost all popular applications. Ever wondered how that works? Well, you store the previous states of your work (which are limited to a specific number), in the memory in such an order that the last one appears first. You can’t really do this with simple arrays very efficiently for reasons we will explore in the coming chapters. ...