We just cover the value of the given node and set its value to the next value and its next pointer to the next pointer .

Just the same as the way : *node = *(node->next);

```
class Solution {
public:
void deleteNode(ListNode* node) {
if(!node->next) {
node=NULL;
return;
}
node->val = node->next->val;
node->next = node->next->next;
/* *node = *node->next */
}
};
```