package day05;
/**
*
* @author chen
* @mail gumu_2008@126.com
* @date 2012-5-1 下午07:33:27
*
* 三者交换,有一个空间换的,易于思考。
* o
* o o
* 就是下面两个变量中,有一个先放到上面的那个做个备份 ,然后可以对其变换 ,最后把改掉的那个再
* 给另外 一个没有改的。
*
*/
public class SelectSortDemo {
/**
* @param args
*/
public static void main(String[] args) {
int[] ary = new int[]{5,12,6,2,8,9};
int[] temp = sort(ary);
int[] temp2 = sort1(ary);
i......
阅读全文