Insert a node at the head of a linked list

  • + 0 comments
    def insertNodeAtHead(head, data):
        node = SinglyLinkedListNode(data)
        node.next = head
        
        return node