class Sorter { public static void sort(int [] a,int n) // sort (in place) the first n integers in array a // uses selection sort { int sorted,minPos; for(sorted=0;sorted0&&a[j-1]>m;j--) a[j]=a[j-1]; a[j]=m; } }