We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8486d5c commit 35ea627Copy full SHA for 35ea627
docs/algorithm/排序/选择排序.md
@@ -15,7 +15,7 @@
15
16
```js
17
function selectionSort(array) {
18
- for (let i = 0; i < array.length; i++) {
+ for (let i = 0; i < array.length - 1; i++) {
19
let minIndex = i;
20
for (let j = i + 1; j < array.length; j++) {
21
if (array[j] < array[minIndex]) {
算法分类/排序/选择排序.md
@@ -8,7 +8,7 @@
8
9
10
11
12
13
14
0 commit comments