package net.piemaster.kuta.algorithms.sorting;

/**
 * Performs Insertion Sort to sort arrays and collections.
 */
public class InsertionSorter<T extends Comparable> extends Sorter<T> {

    /**
     * {@inheritDoc}
     */
    @Override
    public void sort(T[] array) {
        
    }

}

@@ -273,16 +273,704 @@
         
+// Step through each element to shift it back into place.%0A        for (int i = 0; i %3C array.length; i++) %7B%0A%0A            // Step backwards through each element to the left of i.%0A            for (int j = i - 1; j %3E= 0; j--) %7B%0A%0A                // While the element is smaller than the previous element, shift it left.%0A                if (array%5Bj + 1%5D.compareTo(array%5Bj%5D) %3C 0) %7B%0A                    T temp = array%5Bj%5D;%0A                    array%5Bj%5D = array%5Bj + 1%5D;%0A                    array%5Bj + 1%5D = temp;%0A                %7D else %7B%0A                    // Every previous element is sorted, so stop once the element is in place.%0A                    break;%0A                %7D%0A            %7D%0A        %7D
 %0A    %7D%0A%0A

Implement insertion sort