41 / 41 个通过测试用例
状态:通过
执行用时:0 ms
内存消耗:36.5 MB

/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode(int x) { val = x; }
 * }
 */
class Solution {
    public void deleteNode(ListNode node) {
         node.val = node.next.val;
        node.next = node.next.next;
    }
}
Last modification:May 5th, 2020 at 11:06 pm
如果觉得我的文章对你有用,请随意赞赏