2014年3月14日
摘要: 归并算法的中心是归并两个已经有序的数组1. 思想演示:非递归 public static void merge( int[] arrayA, int sizeA, int[] arrayB, int sizeB, int[] arrayC ) { int aDex=0, bDex=0, cDex=0; while(aDex < sizeA && bDex < sizeB) // neither array empty if( a... 阅读全文
posted @ 2014-03-14 15:41 hezhixue 阅读(122) 评论(0) 推荐(0)
摘要: 1. 冒泡排序 public void bubbleSort() { int out, in; for(out=nElems-1; out>1; out--) // outer loop (backward) for(in=0; in a[in+1] ) // out of order? swap(in, in+1); // swap them } // end bubbleSort()2. 选择排序public void selectionSort() { ... 阅读全文
posted @ 2014-03-14 15:11 hezhixue 阅读(167) 评论(0) 推荐(0)
  2014年1月14日
摘要: 1.一个春节,两个人,三个家庭(城市),四趟火车,八张火车票,十天的奔波;别2013,见20142. 为了能够买到1张回家的车票,大家已经不再担心自己的帐号是不是安全,一台电脑上几乎装上了所有能够对买票哪怕有一点帮助的软件,毫无顾忌的输入自己的个人信息,为的就是能够回家!不知道这背后有多少的善意和恶意。 阅读全文
posted @ 2014-01-14 19:26 hezhixue 阅读(113) 评论(0) 推荐(0)