public static void sort(int[] array) { //write your code here int temp = 0; Arrays.sort(array); for (int i = 0; i <= array.length - 1 - i; i++) while (array[i] < array[array.length - 1]) { temp = array[i]; array[i] = array[array.length - 1 - i]; array[array.length - 1 - i] = temp; } } }