Fix broken sort algorithm
This commit is contained in:
parent
b5e1e861bc
commit
e885c492ad
|
@ -51,7 +51,7 @@ public class SortServer implements CommandExecutor {
|
|||
int minIndex = i;
|
||||
|
||||
for (int j = i; j < a.length; j++) {
|
||||
if (a[j] < a[i]) {
|
||||
if (a[j] < a[minIndex]) {
|
||||
minIndex = j;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue