Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ dequeue
Method
dequeue
Python/queue via stack.py:26–32 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
24
self.inStacl.push(item)
25
26
def
dequeue(self):
27
while
len(self.inStack):
28
self.outStack.push(self.inStack.pop())
29
result=self.outStack.pop()
30
while
len(self.outStack):
31
self.inStack.push(self.outStack.pop())
32
return
result
Callers
nothing calls this directly
Calls
2
push
Method · 0.45
pop
Method · 0.45
Tested by
no test coverage detected