public void deleteDupNode(ListNode head){
        if(head == null) return;
        Hashtable table = new Hashtable();
        ListNode pre = null;
        while(head.next!=null){
            if(table.contains(head.val)){
                pre.next = head.next;
            }else{
                table.put(head.val,true);
                pre = head;
            }

            head = head.next;
        }
   }