这个就比较简单了吧
当前的节点的引用节点直接转变为next指针指向的节点
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
void deleteNode(ListNode* node) {
*node=*(node->next);
}
};