Template Class StackWithLinkedListSTL
Defined in File stack_with_linked_list_stl.h
Class Documentation
-
template<typename T>
class StackWithLinkedListSTL Stack with STL linked list class with all related functionality.
- Template Parameters:
T – Type of the implementation class.
Public Functions
-
inline void push(const T &element)
Push an element onto the top of the stack.
- Parameters:
element – The element to be pushed.
-
inline T pop()
Pop an element from the top of the stack and return its value.
- Returns:
The value of the popped element.
-
inline T peek() const
Get the value of the top element of the stack.
- Returns:
The value of the top element of the stack.
-
inline size_t size() const
Get the size of the stack.
- Returns:
Size of the stack.