美文网首页
237. Delete Node in a Linked Lis

237. Delete Node in a Linked Lis

作者: becauseyou_90cd | 来源:发表于2018-07-31 01:34 被阅读0次

    https://leetcode.com/problems/delete-node-in-a-linked-list/description/

    class Solution {
    public void deleteNode(ListNode node) {

        node.val = node.next.val;
        node.next = node.next.next;
    }
    

    }

    相关文章

      网友评论

          本文标题:237. Delete Node in a Linked Lis

          本文链接:https://www.haomeiwen.com/subject/qhxcvftx.html