Given a sorted integer array nums, remove the duplicates in place so that each unique element appears only once, keeping the relative order. Return the resulting deduplicated array.
Input: one line of space-separated integers (sorted). Output: the deduplicated array, space-separated.
1 1 2
1 2
0 0 1 1 1 2 2 3 3 4
0 1 2 3 4
Run your code against the sample tests, or Submit to run the full suite.