(self, element)
| 21 | |
| 22 | |
| 23 | def enqueue(self, element): |
| 24 | new_tail = self._Node(element, None) |
| 25 | if self.is_empty(): |
| 26 | self._head = new_tail |
| 27 | else: |
| 28 | self._tail._next = new_tail |
| 29 | self._tail = new_tail |
| 30 | self._size += 1 |
| 31 | |
| 32 | def dequeue(self): |
| 33 | if self.is_empty(): |