MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / pop

Method pop

python/0225-implement-stack-using-queues.py:11–12  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9 self.q.append(self.q.popleft())
10
11 def pop(self) -> int:
12 return self.q.popleft()
13
14 def top(self) -> int:
15 return self.q[0]

Callers

nothing calls this directly

Calls 1

popleftMethod · 0.80

Tested by

no test coverage detected