MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / add_last

Method add_last

data_structures/linked_list/deque_doubly.py:96–101  ·  view source on GitHub ↗

insertion in the end >>> LinkedDeque().add_last('B').last() 'B'

(self, element)

Source from the content-addressed store, hash-verified

94 return self._insert(self._header, element, self._header._next)
95
96 def add_last(self, element):
97 """insertion in the end
98 >>> LinkedDeque().add_last('B').last()
99 'B'
100 """
101 return self._insert(self._trailer._prev, element, self._trailer)
102
103 # DEqueu Remove Operations (At the front, At the end)
104

Callers

nothing calls this directly

Calls 1

_insertMethod · 0.80

Tested by

no test coverage detected