思路:
// @Title: 删除链表中的节点 (Delete Node in a Linked List)
// @Author: qisiii
// @Date: 2022-02-28 20:35:06
// @Runtime: 0 ms
// @Memory: 40.8 MB
// @comment:
// @flag:
/**
* 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;
}
}