[C++][Recursion] - Simple , straight and easy to understand solution
\npublic:\n    ListNode* deleteDuplicates(ListNode* head) {\n        if(head==NULL || head->next==NULL)\n            return head;\n        if(head->val!=head->n
```\npublic:\n    ListNode* deleteDuplicates(ListNode* head) {\n        if(head==NULL || head->next==NULL)\n            return head;\n        if(head->val!=head->next->val){\n            head->next=deleteDuplicates(head->next);\n            return head;\n        }\n        int val=head->val;\n        while(head && head->val==val)\n            head=head->next;\n        return deleteDuplicates(head);\n    }\n};\n```\n\nTime Complexity:  O(n) where n is number of nodes in linked list.
['C', 'C++']