Given a sorted array nums, remove duplicates in-place so each element appears only once. Return k (the count of unique elements). Print the first k elements.
Example 1:
Input: 1 1 2
Output: 2
1 2Example 2:
Input: 0 0 1 1 1 2 2 3 3 4
Output: 5
0 1 2 3 4Input format: Space-separated sorted integers.
Output format: First line = k. Second line = first k elements.