【leetcode】移除链表元素

struct ListNode* removeElements(struct ListNode* head, int val){ 
    if (head == NULL) {
        return NULL;
    }     

    head->next = removeElements(head->next, val);
    return head->val == val ? head->next : head;
}
原文地址:https://www.cnblogs.com/ganxiang/p/13637311.html