Skip to content

Commit 7678224

Browse files
authored
Updated readme
1 parent 47134c5 commit 7678224

File tree

1 file changed

+10
-2
lines changed
  • src/main/java/g0001_0100/s0026_remove_duplicates_from_sorted_array

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@ The first `k` elements of `nums` should contain the unique numbers in **sorted o
1212

1313
The judge will test your solution with the following code:
1414

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

1725
If all assertions pass, then your solution will be **accepted**.
1826

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

3745
* <code>1 <= nums.length <= 3 * 10<sup>4</sup></code>
3846
* `-100 <= nums[i] <= 100`
39-
* `nums` is sorted in **non-decreasing** order.
47+
* `nums` is sorted in **non-decreasing** order.

0 commit comments

Comments
 (0)