selection sort optimization
This commit is contained in:
parent
156f7a67f4
commit
dba60f03ae
@ -45,10 +45,12 @@ public class Selection<T extends Comparable<T>> extends Sort<T> {
|
||||
min = j;
|
||||
}
|
||||
}
|
||||
if (min != i) {
|
||||
swap(nums, i, min);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 冒泡排序
|
||||
|
Loading…
x
Reference in New Issue
Block a user