Get the last item from the queue.
(self)
| 61 | return -1 if self.isEmpty() else self.queue[self.head] |
| 62 | |
| 63 | def Rear(self) -> int: |
| 64 | """ |
| 65 | Get the last item from the queue. |
| 66 | """ |
| 67 | return -1 if self.isEmpty() else self.queue[self.tail] |
| 68 | |
| 69 | def isEmpty(self) -> bool: |
| 70 | """ |