-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi - found your code when searching for Python Linked List. Curious why you made insertNode so "complex"? It looks more like appendNode. Couldn't you just do:
def insertNode(head, valuetoInsert):
newNode = linkedListNode(valuetoInsert)
newNode.nextNode = head
return newNode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels