-
-
Save alexnikol/b93df3e6aa45ce591a8c38e60a078c8d to your computer and use it in GitHub Desktop.
Insert a node at the head of a linked list. Realization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from linked_list import SinglyLinkedListNode | |
def insertNodeAtHead(llist, data): | |
node = SinglyLinkedListNode(data) | |
node.next = llist | |
return node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment