Courses / Data Structures and Algorithms
6. Creating Stacks
How to implement stacks using lists in Python.
1 min read Chapter 6 of 23
Python
Creating Stacks
A stack is a data structure that follows the Last In, First Out (LIFO) principle.
"I often need to manage tasks where the last one added should be the first one completed."
A stack is a collection of elements that allows adding and removing items in a specific order, where the most recently added item is the first to be removed.
"I often need to manage tasks where the last one added should be the first one completed."
A stack is a collection of elements that allows adding and removing items in a specific order, where the most recently added item is the first to be removed.