/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* struct ListNode *next;
* };
*/
void deleteNode(struct ListNode* node) {
struct ListNode* first=node->next;
if(node==NULL)
return ;
node->val=first->val;
node->next=first->next;
free(first);
}
C语言。开始没理解题干,看了网上C++代码明白含义了。
2016/1/28.