Error in the question

  • 0

    This is my code and it passed the test:
    public void deleteNode(ListNode node) {
    if (node == null) return;
    if ( != null){
    node.val =; =;
    I have to say, the last node cannot be deleted just according to a given node. In the question (No, 203) , you need to be careful.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.