template<typename T>
class Sleak::Stack< T >
Implements a LIFO (Last-In, First-Out) stack data structure.
The Stack class maintains a collection of elements with the most recently added element at the top. It is suitable for scenarios where you need to process elements in a last-come, first-served manner. Use this class when you need to implement function call stacks, expression evaluation, or depth-first search algorithms.
Example Use Cases:
- Implementing a function call stack in a compiler or interpreter.
- Evaluating arithmetic expressions with parentheses.
- Performing depth-first search in graph algorithms.
- Implementing undo/redo functionality in an editor.
Implementation Details:
- Uses an underlying List to store the stack elements.
- Provides methods for pushing (adding) and popping (removing) elements.
- Maintains the LIFO order of elements.
Definition at line 30 of file Stack.hpp.