摘要:
直接插入排序算法,是一个查找和插入的过程,其中的查找过程可以使用折半查找方法来代替,因为插入排序的序列也是一个有序的序列直接插入排序算法的连接有序序列的折半查找算法的链接c#代码 #region 折半插入排序算法 public static void HalfInsertSort(ref int[] array) { for(int i=2;i<array.Length;++i) { array[0] = array[i]; //或者也可以添加if (array[i] < array[i - 1])先行判断 int low = 1; int high = i - 1; while( 阅读全文
posted @ 2010-08-23 23:27
音乐啤酒
阅读(385)
评论(3)
推荐(0)