All pastes #753357 Raw Edit

selectionsortascending

public java v1 · immutable
#753357 ·published 2007-10-29 04:29 UTC
rendered paste body
public static void workedHoursSort (int[][] totalHours) {	for (int i = totalHours[0].length - 1; i >= 1; i--) {		int currentMax = totalHours[0][0];		int currentMaxIndex = 0;		for(int j = 1; j <= i; j++) {			if(currentMax < totalHours[0][j]) {				currentMax = totalHours[0][j];				currentMaxIndex = j;			}		}		if (currentMaxIndex != i) {			totalHours[0][currentMaxIndex] = totalHours[0][i];			totalHours[0][i] = currentMax;			//totalHours[1][i] = currentMaxIndex;		}	}}