MCPcopy Create free account
hub / github.com/BeeBombshell/Python-DSA / __init__

Method __init__

DSA/deque.py:2–6  ·  view source on GitHub ↗
(self, src_arr=[], max_size=300000)

Source from the content-addressed store, hash-verified

1class Deque:
2 def __init__(self, src_arr=[], max_size=300000):
3 self.length = max(max_size, len(src_arr)) + 1
4 self.buf = list(src_arr) + [None] * (self.length - len(src_arr))
5 self.head = 0
6 self.tail = len(src_arr)
7
8 def __index(self, i):
9 l = len(self)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected