public static void SelectionSort(int arras[]) {
int ns = arras.length;
for (int i = 0; i < ns - 1; i++) {
int minindex = i;
for (int j = i + 1; j < ns; i++)
if (arras[j] < arras[minindex])
minindex = j;
int temp = arras[i];
arras[i] = arras[minindex];
arras[minindex] = temp;
}
}
selection sort
Resolved
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
3 March 2020, 15:07solution
Line 7 should increment j and not i
+2
Ashish RajAnand
19 March 2020, 02:42
Sir any idea how to run jar file in local host html page
and how to implement it?
0