stack



Stacks are data structures that follow the Last-In-First-Out (LIFO) principle, meaning the last item inserted into a stack is the first one to be deleted. In other words, a stack is a list of elements that are accessible only from one end of the list, which is called the Top of Stack (ToS).



empty