单链表删除节点

1. LeetCode 237. Delete Node in a Linked List

2. 描述:

删除List中的Node结点

3. 解决方案:

void DeleteNode(ListNode* node){
    ListNode* temp = node;
    *node = *(node->next);
    delete temp;
}
Table of Contents