>>> cq = CircularQueue(5) >>> len(cq) 0 >>> cq.enqueue("A") # doctest: +ELLIPSIS >>> cq.array ['A', None, None, None, None] >>> len(cq) 1
(self)
| 12 | self.size = 0 |
| 13 | |
| 14 | def __len__(self) -> int: |
| 15 | """ |
| 16 | >>> cq = CircularQueue(5) |
| 17 | >>> len(cq) |
| 18 | 0 |
| 19 | >>> cq.enqueue("A") # doctest: +ELLIPSIS |
| 20 | <data_structures.queues.circular_queue.CircularQueue object at ...> |
| 21 | >>> cq.array |
| 22 | ['A', None, None, None, None] |
| 23 | >>> len(cq) |
| 24 | 1 |
| 25 | """ |
| 26 | return self.size |
| 27 | |
| 28 | def is_empty(self) -> bool: |
| 29 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected