// sorts high to low void selection_sort(int list[], int n) { int i, j, max, temp; for(i = 0; i < n; i++) { max = i; for(j = i + 1; j < n; j++) { if(list[max] < list[j]) { max = j; } temp = list[i]; list[i] = list[max]; list[max] = temp; } } }