Skip to content

Commit 514a4b3

Browse files
committed
auto commit
1 parent 73d782b commit 514a4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notes/算法.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public class Selection<T extends Comparable<T>> extends Sort<T> {
301301
@Override
302302
public void sort(T[] nums) {
303303
int N = nums.length;
304-
for (int i = 0; i < N; i++) {
304+
for (int i = 0; i < N - 1; i++) {
305305
int min = i;
306306
for (int j = i + 1; j < N; j++) {
307307
if (less(nums[j], nums[min])) {

0 commit comments

Comments
 (0)