mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-07 22:35:54 +00:00
"Fixed variable name in conditional statement and removed newline character from print statement."
This commit is contained in:
parent
44ebb6632b
commit
2f9dc7d5b7
@ -93,7 +93,7 @@ class SortedLinkedList:
|
|||||||
self.head = new_node
|
self.head = new_node
|
||||||
else:
|
else:
|
||||||
temp_node: Node | None = self.head
|
temp_node: Node | None = self.head
|
||||||
if temp:
|
if temp_node:
|
||||||
while temp_node.next_node and temp_node.next_node.data < data:
|
while temp_node.next_node and temp_node.next_node.data < data:
|
||||||
temp_node = temp_node.next_node
|
temp_node = temp_node.next_node
|
||||||
new_node.next_node = temp_node.next_node
|
new_node.next_node = temp_node.next_node
|
||||||
@ -365,4 +365,4 @@ if __name__ == "__main__":
|
|||||||
elif choice == "4":
|
elif choice == "4":
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print("Wrong input")
|
print("Wrong input"
|
Loading…
x
Reference in New Issue
Block a user