@@ -0,0 +1,640 @@
+/**%0A * Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.%0A */%0Apublic class Solution %7B%0A  public ListNode deleteDuplicates(ListNode head) %7B%0A    if (head == null) return head;%0A    ListNode temp = new ListNode(-1);%0A    temp.next = head;%0A    ListNode pre = temp;%0A    ListNode cur = head;%0A    while (cur != null) %7B%0A      while (cur.next != null && cur.val == cur.next.val) %7B%0A        cur = cur.next;%0A      %7D%0A%0A      if(pre.next == cur) %7B%0A        pre = pre.next;%0A      %7D else %7B%0A        pre.next = cur.next;%0A      %7D%0A      cur = cur.next;%0A    %7D%0A    return temp.next;%0A  %7D%0A%7D%0A%0A

Add 82