LeetCode 237. 删除链表中的节点
作者:互联网
题目链接:点击这里
/**
* 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;
}
}
标签:node,ListNode,val,int,class,next,链表,237,LeetCode 来源: https://blog.csdn.net/qq_42815188/article/details/121629102