标签:
LeetCode 237 Delete Node in a Linked List
/** * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ void deleteNode(struct ListNode* node) { if(node==NULL || node->next==NULL) return; node->val = node->next->val; node->next = node->next->next; }
LeetCode 237 Delete Node in a Linked List
标签:
原文地址:http://www.cnblogs.com/walker-lee/p/4887028.html