diff --git a/Sorts/SelectionSort.java b/Sorts/SelectionSort.java index 5b850dd33..90f852df9 100644 --- a/Sorts/SelectionSort.java +++ b/Sorts/SelectionSort.java @@ -32,7 +32,7 @@ public class SelectionSort implements SortAlgorithm { int min = i; for (int j = i + 1; j < n; j++) { - if (arr[min].compareTo(arr[j]) < 0) { + if (arr[min].compareTo(arr[j]) > 0) { min = j; } }