diff --git a/data_structures/stacks/stack_tracking_min_max.py b/data_structures/stacks/stack_tracking_min_max.py index 102504446..6c638110d 100644 --- a/data_structures/stacks/stack_tracking_min_max.py +++ b/data_structures/stacks/stack_tracking_min_max.py @@ -152,6 +152,15 @@ class MinMaxStack: def stack_is_valid(self) -> bool: """ Validate stack is not empty + + >>> test_stack = MinMaxStack(3) + >>> test_stack.stack_is_valid() + Stack is empty + False + >>> test_stack.push_value(0) + True + >>> test_stack.stack_is_valid() + True """ if len(self.stack) == 0: print("Stack is empty")