Insert a node at the head of a linked list

  • + 0 comments

    def insertNodeAtHead(llist, data): newnode = SinglyLinkedListNode(data) newnode.next = llist return newnode