Fund. CS II (CS152 2004F)

Homework 45: Selection Sort

Due: 10:00 a.m., Friday, 19 November 2004

Implement the selection sort method (presumably by writing a SelectionSorter class that implements Sorter).

The strategy for selection sort is something like the following:

for i = 0 to length-1
	find the smallest value in positions i to length-1
	swap it with the value at position i

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Wed Dec 8 10:36:58 2004.
The source to the document was last modified on Fri Nov 19 10:32:08 2004.
This document may be found at

You may wish to validate this document's HTML ; Valid CSS! ; Check with Bobby

Samuel A. Rebelsky,