You are viewing a single comment's thread. Return to all comments →
Heres a really simple and clear code in python
def insertNodeAtHead(head, data): temp = SinglyLinkedListNode(data) if not head: return temp else: temp.next = head head = temp return head
Seems like cookies are disabled on this browser, please enable them to open this website
Insert a node at the head of a linked list
You are viewing a single comment's thread. Return to all comments →
Heres a really simple and clear code in python