4.1.2.1 Properties of Stack
Computational Structures
- LIFO Principle: A stack works by the Last-In, First-Out rule. The last item added is the first one removed.
- Single Access Point: You can only add or remove items from the top of the stack.
- Order Preservation: The order in which you add items is preserved, with the last item added being the first to leave.
- Size Flexibility: A stack can either have a fixed size or grow as needed.
Sequential Access: You can only access items in the order they were added, starting from the top.