Insert a node at the head of a linked list

  • + 0 comments

    It must be something wrong with the task. The constrains says that the lsit is not null and data is not null. So I made a simple code:

         SinglyLinkedListNode node =new SinglyLinkedListNode(data);
         node.next=llist;
         return node; 
    
                 But I run in a bunch of nullable errors. 
                 Also the explanation looks like an explanation from some other task.