@@ -34,15 +34,19 @@ Example 1:
34
34
35
35
Input: nums = [1,1,2]
36
36
Output: 2, nums = [1,2,_]
37
- Explanation: Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively.
38
- It does not matter what you leave beyond the returned k (hence they are underscores).
37
+ Explanation: Your function should return k = 2,
38
+ with the first two elements of nums being 1 and 2 respectively.
39
+ It does not matter what you leave beyond the returned k
40
+ (hence they are underscores).
39
41
40
42
Example 2:
41
43
42
44
Input: nums = [0,0,1,1,1,2,2,3,3,4]
43
45
Output: 5, nums = [0,1,2,3,4,_,_,_,_,_]
44
- Explanation: Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4 respectively.
45
- It does not matter what you leave beyond the returned k (hence they are underscores).
46
+ Explanation: Your function should return k = 5,
47
+ with the first five elements of nums being 0, 1, 2, 3, and 4 respectively.
48
+ It does not matter what you leave beyond the returned k
49
+ (hence they are underscores).
46
50
47
51
48
52
Constraints:
0 commit comments