Skip to content
Prev Previous commit
Next Next commit
Added doctests to the swap_nodes file under linkedlist data structure
  • Loading branch information
PreciousJac0b committed Oct 21, 2023
commit 0f39846b3ac407fb7ef0c899f42b575f85bf7ed2
2 changes: 1 addition & 1 deletion data_structures/linked_list/swap_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def swap_nodes(self, node_data_1, node_data_2) -> None:
>>> new_list.print_list()
5 2 3 4 1

When just a single value is present in the linkedlist.
When one value is present and the other isn't in the linkedlist.
>>> second_list = LinkedList()
>>> second_list.push(6)
>>> second_list.push(7)
Expand Down