MCPcopy Index your code
hub / github.com/OmkarPathak/pygorithm / insert_front

Method insert_front

pygorithm/data_structures/queue.py:110–117  ·  view source on GitHub ↗

inserts an element at the front end of the deque

(self, data)

Source from the content-addressed store, hash-verified

108 self.queue.insert(0, data)
109
110 def insert_front(self, data):
111 """
112 inserts an element at the front end of the deque
113 """
114 if self.is_full():
115 return -1
116 else:
117 self.queue.append(data)
118
119 def delete_rear(self):
120 """

Callers 1

test_dequeMethod · 0.95

Calls 1

is_fullMethod · 0.95

Tested by 1

test_dequeMethod · 0.76