MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / Rear

Method Rear

Python/622-Design-Circular-Queue.py:63–67  ·  view source on GitHub ↗

Get the last item from the queue.

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected