@@ -0,0 +1,864 @@
+import java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class SelectionSort %7B%0A%09%0A%09public static List%3CInteger%3E selectionSort(List%3CInteger%3E lst)%7B%0A%09%09//go from last index to first%0A%09%09for(int passes= lst.size()-1; passes != -1; --passes)%7B%0A%09%09%09int posOfMax = 0;%09%09%09%09%09//default max is 0%0A%09%09%09for(int i=1; i != passes+1; ++i)%7B%09//go from %5D0, passes%5D%0A%09%09%09%09if(lst.get(i) %3E lst.get(posOfMax))%7B%0A%09%09%09%09%09posOfMax = i;%09%09%09%09//find index of biggest%0A%09%09%09%09%7D%09%09%09%09%09%09%09%09//and place it at index%0A%09%09%09%7D%09%09%09%09%09%09%09%09%09//passes%0A%09%09%09swap(lst, passes, posOfMax);%0A%09%09%7D%0A%09%09%0A%09%09return lst;%0A%09%7D//end selectionSort%0A%09%0A%09public static void swap(List%3CInteger%3E lst, int i, int j)%7B%0A%09%09int temp = lst.get(i);%0A%09%09lst.set(i, lst.get(j));%0A%09%09lst.set(j, temp);%0A%09%7D//end swap%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09List%3CInteger%3E list = Arrays.asList(23,57,75,33,6,8,56);%0A%09%09System.out.println( selectionSort(list).toString() );%0A%09%7D%0A%0A%7D%0A

Create selectionsort.java