算法
lixp9
这个作者很懒,什么都没留下…
展开
-
快速排序
public static Integer CUTOFF = 10; /** * 交换位置 */ public static > void swapReferences(AnyType [] a,int left,int right){ AnyType temp ; temp = a[ left ]; a[ left ] = a[ right ]; a[ right ] = temp; } /** * 插入排序 */ public static > void insertSort原创 2010-12-07 10:41:00 · 487 阅读 · 0 评论 -
合并排序
package cn.cnooc.algorithm;/** * 归并排序 * @author 选自《数据结构与算法分析 Java语言描述》 Mark Allen Weiss * */public class MergeSort { /** * MergeSort Algorithm * @param * @param a an array of Comparable items */ @SuppressWarnings({ "unchecked" }) private static > v原创 2010-11-21 16:21:00 · 401 阅读 · 0 评论