We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bc6bbc commit d77f6e2Copy full SHA for d77f6e2
src/algorithms/selection-sort/selection-sort.js
@@ -47,7 +47,7 @@ class Selection {
47
*/
48
static isSorted (array, comparator = defaultComparator) {
49
for (let i = 1; i < array.length; i++) {
50
- if (Selection.less(array[i], array[i - 1], comparator)) {
+ if (this.less(array[i], array[i - 1], comparator)) {
51
return false
52
}
53
@@ -79,12 +79,12 @@ class Selection {
79
let min = i
80
81
for (let j = i + 1; j < n; j++) {
82
- if (Selection.less(array[j], array[min], comparator)) {
+ if (this.less(array[j], array[min], comparator)) {
83
min = j
84
85
86
87
- Selection.exchange(array, i, min)
+ this.exchange(array, i, min)
88
89
90
0 commit comments