/**
 * Definition for singly-linked list.
 * public class ListNode {
 *     int val;
 *     ListNode next;
 *     ListNode(int x) { val = x; }
 * }
 */
class rmDup {
    public ListNode deleteDuplicates(ListNode head) {
        
        if(head == null){
            return head;
        }
        
        ListNode curr = head;
        while(curr != null){
            ListNode temp = curr;
            
            while(temp != null && temp.val == curr.val ){
                temp = temp.next;
            }
            curr.next = temp;
            curr = temp;
        }
        
        
        return head;
        
    }
}

@@ -1,155 +1,4 @@
-/**%0A * Definition for singly-linked list.%0A * public class ListNode %7B%0A *     int val;%0A *     ListNode next;%0A *     ListNode(int x) %7B val = x; %7D%0A * %7D%0A */
 %0Acla

Update rmDup.java