@@ -0,0 +1,1182 @@
+package me.alivecode.algs4;%0A%0Aimport java.util.ArrayList;%0A%0Aimport edu.princeton.cs.algs4.StdIn;%0Aimport edu.princeton.cs.algs4.StdOut;%0A%0Apublic class Insertion %7B%0A    private Insertion() %7B%7D%0A%0A    public static void sort(Comparable%5B%5D a) %7B%0A        for (int i = 0; i %3C a.length; i++)%0A            for(int j = i; j %3E 0 && less(a%5Bj%5D, a%5Bj-1%5D); j--) %7B%0A                exch(a, j, j-1);%0A            %7D%0A    %7D%0A%0A    private static boolean less(Comparable a, Comparable b) %7B%0A        return (a.compareTo(b) %3C 0);%0A    %7D%0A%0A    public static void exch(Comparable a%5B%5D, 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%0A        while(!StdIn.isEmpty()) %7B%0A            list.add(StdIn.readString());%0A        %7D%0A%0A        String%5B%5D a = new String%5Blist.size()%5D;%0A        list.toArray(a);%0A        %0A        StdOut.println(%22Before being sorted%22);%0A        for(String s : a) %7B%0A            StdOut.println(s);%0A        %7D%0A        StdOut.println(%22After being sorted%22);%0A        Insertion.sort(a);%0A        for(String s : a) %7B%0A            StdOut.println(s);%0A        %7D%0A    %7D%0A%0A%7D%0A%0A%0A

Add insertion sort class.