• + 0 comments
         if (position == 0){
        if (head.next == null){
            return null;
        }
        else {
            return head.next;
        }
    }
    else {
        SinglyLinkedListNode current = head;
        for (int i = 0;i < position - 1; i++){
            current = current.next;
        }
        current.next = current.next.next;
        return head;
    }
    
    }