@@ -0,0 +1,1631 @@
+package com.sorting;%0A%0A/**%0A * In computer science, selection sort is a sorting algorithm, specifically an%0A * in-place comparison sort. It has O(n2) time complexity, making it inefficient%0A * on large lists, and generally performs worse than the similar insertion sort.%0A * Selection sort is noted for its simplicity, and it has performance advantages%0A * over more complicated algorithms in certain situations, particularly where%0A * auxiliary memory is limited.%0A * %0A * %7B@link https://en.wikipedia.org/wiki/Selection_sort%7D%0A * %0A * @author STEPHANE MIGUEL KAKANAKOU (Skakanakou@gmail.com)%0A *%0A */%0Apublic class SelectionSort %7B%0A%0A    /**%0A     * Use the selection sort method to sort the given array A%0A     * %0A     * @param A%0A     *            Array of Comparable that contains the object to sort%0A     */%0A    public static void sort(Comparable%5B%5D A) %7B%0A        if (A == null)%0A            return;%0A        int indice;%0A        int len = A.length;%0A        for (int i = 0; i %3C len - 1; i++) %7B%0A            indice = minIndice(A, i, len);%0A            swap(A, indice, i);%0A        %7D%0A    %7D%0A%0A    private static boolean less(Comparable%5B%5D A, int i, int j) %7B%0A        int cmp = A%5Bi%5D.compareTo(A%5Bj%5D);%0A        if (cmp %3C 0)%0A            return true;%0A        return false;%0A    %7D%0A%0A    private static void swap(Comparable%5B%5D A, int i, int j) %7B%0A        Comparable inter = A%5Bi%5D;%0A        A%5Bi%5D = A%5Bj%5D;%0A        A%5Bj%5D = inter;%0A    %7D%0A%0A    private static int minIndice(Comparable%5B%5D A, int lo, int hi) %7B%0A        int indice = lo;%0A        for (int i = lo + 1; i %3C hi; i++) %7B%0A            if (less(A, i, indice))%0A                indice = i;%0A        %7D%0A        return indice;%0A    %7D%0A%0A%7D%0A

Add SelectionSort for the Selection sort