Computer Science A - Selection Sort - 9/23/99 void SelectionSort(apvector& numbers) { int pos, //array location swapped with lowest array location lowSpot; //holds value of the lowest array location for(pos = 0; pos < numbers.length() - 1; pos++) { lowSpot = PosOfLowest(numbers, pos, numbers.length() - 1); swap(numbers[pos], numbers[lowSpot]; } } int PosOfLowest(const apvector& numbers, int left, int right) { int pos, //location of array index already sorted lowestPos = left; //finds lowest index of non sorted array for(pos = left + 1; pos <= right; pos++) if(numbers[pos] < numbers[lowestPos]) lowestPos = pos; return lowestPos; } selSort.cpp