public ListNode deleteDuplicates(ListNode head) {
    	
    	if(head == null)
    		return head;
        
    	ListNode slow = head;
    	ListNode fast = head.next;
    	
    	while(fast != null) {
    		if(fast.val == slow.val) {
    			slow.next = fast.next;
    			fast = fast.next;
    		} else {
    			slow = slow.next;
    			fast = fast.next;
    		}
    	}
    	
    	return head;
    }