Checks whether the queue is empty or not >>> cq = CircularQueue(5) >>> cq.is_empty() True >>> cq.enqueue("A").is_empty() False
(self)
| 26 | return self.size |
| 27 | |
| 28 | def is_empty(self) -> bool: |
| 29 | """ |
| 30 | Checks whether the queue is empty or not |
| 31 | >>> cq = CircularQueue(5) |
| 32 | >>> cq.is_empty() |
| 33 | True |
| 34 | >>> cq.enqueue("A").is_empty() |
| 35 | False |
| 36 | """ |
| 37 | return self.size == 0 |
| 38 | |
| 39 | def first(self): |
| 40 | """ |