inserts an element at the rear end of the deque
(self, data)
| 99 | return len(self.queue) >= self.limit |
| 100 | |
| 101 | def insert_rear(self, data): |
| 102 | """ |
| 103 | inserts an element at the rear end of the deque |
| 104 | """ |
| 105 | if self.is_full(): |
| 106 | return |
| 107 | else: |
| 108 | self.queue.insert(0, data) |
| 109 | |
| 110 | def insert_front(self, data): |
| 111 | """ |