struct ListNode* deleteDuplicates(struct ListNode* head){ if (!head) return NULL; head->next = deleteDuplicates(head->next); return (head->next && head->val == head->next->val)? head->next: head; }