Anonym
public text v1 · immutablepublic int[] Sort (int[] a) {
Boolean hasSlipped;
int []result = new int [a.length];
for (int i = 0; i < a.length; i++) {
if (result.length == 0) {
result[i] = a[i];
} else {
hasSlipped = false;
for(int j = 0; i < result.length; ++j) {
if (a[i] > result[j]){
result = slip(result, j, a[i]);
hasSlipped = true;
}
}
if (hasSlipped == false) {
result[result.length] = a[i];
}
}
}
return result;
}