class minsort
{
private double array[]; // The array being sorted
// Calling
minsort constructor on array of doubles sorts
// the array
elements 0..(N-1).
minsort(double array[], int N)
{
this.array = array;
for( int i = 0; i < N; i++ )
{
swap(i, findMin(i, N));
}
}