Leetcode 237 Delete Node in a Linked List 链表
如题 删除是要注意让现在的链表等于下一个链表的值
1 class Solution { 2 public: 3 void deleteNode(ListNode* node) { 4 ListNode *nextnode = node ->next; 5 *node = *nextnode; 6 node->next = nextnode ->next; 7 delete nextnode; 8 } 9 };