JAVA - EASY 10 Line Solution with EXPLANATION
\npublic ListNode deleteDuplicates(ListNode head) {\n\tif(head == null) return head;\n\tListNode dummy = new ListNode(0), pre = dummy, curr = head;\n\tpre.next 
```\npublic ListNode deleteDuplicates(ListNode head) {\n\tif(head == null) return head;\n\tListNode dummy = new ListNode(0), pre = dummy, curr = head;\n\tpre.next = curr;\n\twhile(curr != null) {\n\t\twhile(curr.next != null && curr.val == curr.next.val) \n\t\t\tcurr = curr.next;                   // curr goes to next node until it finds new val which is not same as prev one\n\t\tif(pre.next == curr) pre = pre.next;    // no duplicate, so move pre to next node\n\t\telse pre.next = curr.next;              // skip duplicate but don\'t move pre\n\t\tcurr = curr.next;                       // update curr\n\t}\n\treturn dummy.next;\n}\n```
[]