Skip to content

Commit 232663c

Browse files
authored
Update readme.md
1 parent 8ed6eba commit 232663c

File tree

1 file changed

+8
-2
lines changed
  • src/main/java/g0001_0100/s0080_remove_duplicates_from_sorted_array_ii

1 file changed

+8
-2
lines changed

src/main/java/g0001_0100/s0080_remove_duplicates_from_sorted_array_ii/readme.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ Do **not** allocate extra space for another array. You must do this by **modifyi
1414

1515
The judge will test your solution with the following code:
1616

17-
int[] nums = [...]; // Input array int[] expectedNums = [...]; // The expected answer with correct length int k = removeDuplicates(nums); // Calls your implementation assert k == expectedNums.length; for (int i = 0; i < k; i++) { assert nums[i] == expectedNums[i]; }
17+
int[] nums = [...]; // Input array
18+
int[] expectedNums = [...]; // The expected answer with correct length
19+
int k = removeDuplicates(nums); // Calls your implementation
20+
assert k == expectedNums.length;
21+
for (int i = 0; i < k; i++) {
22+
assert nums[i] == expectedNums[i];
23+
}
1824

1925
If all assertions pass, then your solution will be **accepted**.
2026

@@ -38,4 +44,4 @@ If all assertions pass, then your solution will be **accepted**.
3844

3945
* <code>1 <= nums.length <= 3 * 10<sup>4</sup></code>
4046
* <code>-10<sup>4</sup> <= nums[i] <= 10<sup>4</sup></code>
41-
* `nums` is sorted in **non-decreasing** order.
47+
* `nums` is sorted in **non-decreasing** order.

0 commit comments

Comments
 (0)