面试题 02.03. 删除中间节点
作者:互联网
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * struct ListNode *next; 6 * }; 7 */ 8 void deleteNode(struct ListNode* node) { 9 struct ListNode * p = node->next; 10 node->val = p->val; 11 node->next = p->next; 12 free(p); 13 }
标签:node,面试题,ListNode,struct,val,02.03,next,节点 来源: https://www.cnblogs.com/Knightl8/p/14893146.html