MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / get

Method get

data_structures/queues/queue_on_pseudo_stack.py:28–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

26 item that was dequeued"""
27
28 def get(self) -> Any:
29 self.rotate(1)
30 dequeued = self.stack[self.length - 1]
31 self.stack = self.stack[:-1]
32 self.rotate(self.length - 1)
33 self.length = self.length - 1
34 return dequeued
35
36 """Rotates the queue {@code rotation} times
37 @param rotation

Callers 8

build_treeFunction · 0.95
level_orderFunction · 0.95
level_order_actualFunction · 0.95
bfsMethod · 0.95
breadth_first_searchFunction · 0.95
frontMethod · 0.95
traverseMethod · 0.95
breadth_first_searchFunction · 0.95

Calls 1

rotateMethod · 0.95

Tested by

no test coverage detected