Given the head of a sorted linked list, delete all duplicates so that
each element appears only once. Return the modified list head (still sorted).
head = [1,1,2][1,2]head = [1,1,2,3,3][1,2,3]curr = head.curr != null && curr.next != null.curr.val == curr.next.val → curr.next = curr.next.next. Stay at curr.curr = curr.next.head.
Because the list is already sorted, all duplicates of a value are
adjacent. We rewire curr.next to skip over the duplicate node — O(1) pointer update,
no extra memory. The skip arc shows exactly which pointer is redirected. curr never moves backward;
it either stays (if the next node was a duplicate that got unlinked) or advances forward.