Check if the stack is empty. Returns: True if the stack has no elements.
(self)
| 32 | self.items: list[int] = [] |
| 33 | |
| 34 | def is_empty(self) -> bool: |
| 35 | """Check if the stack is empty. |
| 36 | |
| 37 | Returns: |
| 38 | True if the stack has no elements. |
| 39 | """ |
| 40 | return self.items == [] |
| 41 | |
| 42 | def _push_direct(self, item: int) -> None: |
| 43 | """Append an item without enforcing order. |
no outgoing calls