@@ -0,0 +1,1171 @@
+/**%0A * Company%0A * Copyright (C) 2014-2017 All Rights Reserved.%0A */%0Apackage com.cwenao.datastructure;%0A%0A/**%0A * %E9%80%89%E6%8B%A9%E6%8E%92%E5%BA%8F%EF%BC%9A%0A * %E5%85%83%E7%B4%A0i%E4%B8%8Ei+1....N %E4%B8%AA%E5%85%83%E7%B4%A0%E6%AF%94%E8%BE%83%0A * %E8%BE%83%E5%B0%8F%E7%9A%84%E5%85%83%E7%B4%A0%E6%94%BE%E5%85%A5%E5%88%B0i%E4%BD%8D%E7%BD%AE%0A * @author cwenao%0A * @version $Id SelectionSort.java, v 0.1 2017-05-08 13:51 cwenao Exp $$%0A */%0Apublic class SelectionSort %7B%0A%0A    /**%0A     * %E6%80%BB%E5%85%B1%E6%9C%89N%E6%AC%A1%E4%BA%A4%E6%8D%A2%E4%BB%A5%E5%8F%8A(N-1)+(N-2)+...+2+1=N(N-1)/2 %EF%BD%9E N2/2 %E6%AC%A1%E6%AF%94%E8%BE%83%0A     * @param selectArray%0A     * @return%0A     */%0A    public static int%5B%5D selection(int%5B%5D selectArray) %7B%0A%0A        if (null == selectArray %7C%7C selectArray.length %3C 1) %7B%0A            return null;%0A        %7D%0A        int len = selectArray.length;%0A%0A        for(int i=0; i%3Clen;i++) %7B%0A            int temp = 0;%0A            for(int m = i+1; m %3C len;m++) %7B%0A                if (selectArray%5Bi%5D %3E selectArray%5Bm%5D) %7B%0A                    temp = selectArray%5Bm%5D;%0A                    selectArray%5Bm%5D = selectArray%5Bi%5D;%0A                    selectArray%5Bi%5D = temp;%0A                %7D%0A            %7D%0A        %7D%0A        return selectArray;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D select = new int%5B%5D%7B5, 1, 2, 4, 0%7D;%0A        int%5B%5D arr = selection(select);%0A        for (int x : arr) %7B%0A            System.out.println(x);%0A        %7D%0A    %7D%0A%7D%0A%0A

add the selection sort