Java 100% faster Solution using two pointer
```class Solution {\n    public ListNode deleteDuplicates(ListNode head) {\n        ListNode dummy=new ListNode();\n        dummy.next=head;\n        ListNode p
```class Solution {\n    public ListNode deleteDuplicates(ListNode head) {\n        ListNode dummy=new ListNode();\n        dummy.next=head;\n        ListNode prev=dummy;\n        ListNode curr=head;\n        while(curr!=null){\n            if(curr.next!=null && curr.val==curr.next.val) {\n                while(curr.next!=null && curr.val==curr.next.val){\n                    curr=curr.next;\n                }\n               prev.next=curr.next;\n            }\n            else{\n                prev=curr; \n            }\n            curr=curr.next;\n        }\n      return dummy.next;\n    }\n}
['Two Pointers', 'Java']