Skip to content

Commit d09a805

Browse files
LoganLieoucclauss
andcommitted
* Typo? newNod -> newNode * newNode -> new_node Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 56e7ae0 commit d09a805

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data_structures/linked_list/singly_linked_list.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def insert_tail(self, data) -> None:
2121
temp.next = Node(data) # create node & link to tail
2222

2323
def insert_head(self, data) -> None:
24-
newNod = Node(data) # create a new node
24+
new_node = Node(data) # create a new node
2525
if self.head:
26-
newNod.next = self.head # link newNode to head
27-
self.head = newNod # make NewNode as head
26+
new_node.next = self.head # link new_node to head
27+
self.head = new_node # make NewNode as head
2828

2929
def print_list(self) -> None: # print every node data
3030
temp = self.head

0 commit comments

Comments
 (0)