package com.imooc.look;
import java.util.Arrays;
public class 排序算法 {
/**
* @param args
*/
public static void main(String[] args) {
int scors[]= {18,34,56,23,45,10,7,34,46,23};
int arr[] = new int[101];
for (int i = 0; i < scors.length-1; i++) {
arr[scors[i]] = 1;
}
for(int i=0,j=0;i<=arr.length-1&&j<=scors.length-1;i++){
if(arr[i] == 1){
scors[j++] = i;
}
}
System.out.println(Arrays.toString(scors));
}
}
损失函数