You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
选择排序,运行时间:O(n^2) // 找出数组中最小的数字 function findSmallest (arr) { let minValue = arr[0] let minIndex = 0 for (let i in arr) { let item = arr[i] if (item >= minValue) { continue } minIndex = i minValue = item } return minIndex } // 对数字进行排序 function selectionSort (arr) { let len = arr.length let newArr = [] for (let i = 0;
The text was updated successfully, but these errors were encountered:
https://zhelin.me/post/0882e6eb04f593718090cbc83ce329f5/
选择排序,运行时间:O(n^2) // 找出数组中最小的数字 function findSmallest (arr) { let minValue = arr[0] let minIndex = 0 for (let i in arr) { let item = arr[i] if (item >= minValue) { continue } minIndex = i minValue = item } return minIndex } // 对数字进行排序 function selectionSort (arr) { let len = arr.length let newArr = [] for (let i = 0;
The text was updated successfully, but these errors were encountered: