Skip to content

Commit 023ad18

Browse files
committed
Fix
1 parent afeb1dd commit 023ad18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: data_structures/linked_list/doubly_linked_list_two.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def insert_at_position(self, position: int, value: int) -> None:
126126
return
127127
current_position += 1
128128
node = node.next
129-
self.insert_after_node(self.tail, new_node)
129+
self.set_tail(new_node)
130130

131131
def get_node(self, item: int) -> Node:
132132
node = self.head
@@ -238,6 +238,7 @@ def create_linked_list() -> None:
238238
9
239239
>>> linked_list = LinkedList()
240240
>>> linked_list.insert_at_position(position=1, value=10)
241+
>>> linked_list
241242
"""
242243

243244

0 commit comments

Comments
 (0)