@@ -0,0 +1,1301 @@
+package me.alivecode.algs4;%0A%0Aimport java.util.ArrayList;%0A%0Aimport edu.princeton.cs.algs4.StdIn;%0Aimport edu.princeton.cs.algs4.StdOut;%0A%0A%0Apublic class Selection %7B%0A    private Selection() %7B%7D%0A%0A    public static void sort(Comparable%5B%5D a) %7B%0A        for(int i = 0; i %3C a.length; i++) %7B%0A            int  min = i;%0A            for(int j=i+1; j %3C a.length; j++) %7B%0A                if (less(a%5Bj%5D,a%5Bmin%5D)) %7B%0A                    min = j;%0A                %7D%0A            %7D         %0A            exch(a, i, min);%0A        %7D%0A    %7D%0A%0A    private static boolean less(Comparable v, Comparable w) %7B%0A        return v.compareTo(w) %3C 0;%0A    %7D%0A%0A    private static void exch(Comparable%5B%5D a, int i, int j) %7B%0A        Comparable tmp = a%5Bi%5D;%0A        a%5Bi%5D = a%5Bj%5D;%0A        a%5Bj%5D = tmp;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        ArrayList%3CString%3E list = new ArrayList%3CString%3E();%0A        while(!StdIn.isEmpty()) %7B%0A            list.add(StdIn.readString());%0A        %7D%0A        String%5B%5D a = new String%5Blist.size()%5D;%0A        list.toArray(a);%0A        StdOut.println(%22Before being sorted.%22);%0A        for(String s: a) %7B%0A            StdOut.println(s);%0A        %7D%0A        Selection.sort(a);%0A        StdOut.println(%22After being sorted.%22);%0A        for(String s: a) %7B%0A            StdOut.println(s);%0A        %7D%0A    %7D%0A         %0A%7D            %0A

Add selection sort class.