Skip to content

Commit fab9674

Browse files
Update doubly_linked_list_two.py
1 parent 8603561 commit fab9674

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

data_structures/linked_list/doubly_linked_list_two.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -245,18 +245,23 @@ def create_linked_list() -> None:
245245
>>> linked_list
246246
LinkedList(head=Node(data=10, previous=None, next=None), tail=Node(data=10, previous=None, next=None))
247247
>>> str(linked_list)
248+
'10'
248249
>>> linked_list.insert_at_position(position=2, value=20)
249250
>>> linked_list
250251
>>> str(linked_list)
252+
'10 20'
251253
>>> linked_list.insert_at_position(position=1, value=30)
252254
>>> linked_list
253255
>>> str(linked_list)
254-
>>> linked_list.insert_at_position(position=2, value=40)
256+
'30 10 20'
257+
>>> linked_list.insert_at_position(position=3, value=40)
255258
>>> linked_list
256259
>>> str(linked_list)
257-
>>> linked_list.insert_at_position(position=3, value=50)
260+
'30 10 40 20'
261+
>>> linked_list.insert_at_position(position=5, value=50)
258262
>>> linked_list
259263
>>> str(linked_list)
264+
'30 10 40 20 50'
260265
"""
261266

262267

0 commit comments

Comments
 (0)