Homonym: stack (Pile)
A "stack" is a data structure that follows a Last In, First Out (LIFO) principle, meaning the last item added is the first one to be removed. It can be visualized like a stack of plates; you add plates to the top and also remove them from the top. Common operations on a stack include "push" (adding an item) and "pop" (removing the top item).
Stacks are widely used in computer science for various applications, such as managing function calls in programming languages like Python and Java. They are also essential in algorithms for tasks like parsing expressions and backtracking in search problems.