class Sort {

    public static void selectSort(int[] data) {
        int len = data.length;
        for (int i = 0; i < len; i++) {
            int index = i;
            int maxValue = data[index];
            for (int j = index; j < len; j++) {
                if (data[j] > maxValue) {
                    index = j;
                    maxValue = data[j];
                }
            }
            int temp = data[i];
            data[i] = data[index];
            data[index] = temp;
        }
    }

}