MCPcopy Index your code
hub / github.com/keon/algorithms / is_empty

Method is_empty

algorithms/data_structures/queue.py:29–35  ·  view source on GitHub ↗

Check if the queue is empty. Returns: True if the queue has no elements.

(self)

Source from the content-addressed store, hash-verified

27 return self._size
28
29 def is_empty(self) -> bool:
30 """Check if the queue is empty.
31
32 Returns:
33 True if the queue has no elements.
34 """
35 return self._size == 0
36
37 @abstractmethod
38 def enqueue(self, value: object) -> None:

Callers 4

dequeueMethod · 0.45
peekMethod · 0.45
dequeueMethod · 0.45
peekMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected