public class F {
public static void main(String[] args) {
int[] as = {1,6,8,9,4,6,7,5,3,1,24,5,67,4};
for (int i = 0; i < as.length; i++) {
System.out.print(as[i]+" ");
}
System.out.println();
for (int i = 0; i < as.length; i++) {
for (int j = i; j < as.length; j++) {
if (as[i] > as[j]){
as[i] = as[i] + as[j];
as[j] = as[i] - as[j];
as[i] = as[i] - as[j];
}
}
}
for (int i = 0; i < as.length; i++) {
System.err.print(as[i]+" ");
}
}
}
面试时候有事大脑一片空白