摘要: (1)插入排序插入排序是逐个处理待排序的记录,每个新记录与前面已排序的子序列进行比较,将它插入到子序列中正确的位置 ,如下图所示。View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace studyCSharp{ class Program { static void Main(string[] args) { int[] a={6,5,4,7,9,8,10,3,2,1};//待排序的数组 ... 阅读全文
posted @ 2012-10-09 15:27 尼姑哪里跑 阅读(165) 评论(0) 推荐(0) 编辑
摘要: namespace 插入排序{ class Program { static void Main(string[] args) { int[] A=new int[7]{2,5,4,1,3,6,8}; InsertSort(A); for (int i = 0; i < A.Length; i++) { Console.WriteLine(A[i].ToString()); } Console.... 阅读全文
posted @ 2012-10-09 14:20 尼姑哪里跑 阅读(241) 评论(0) 推荐(0) 编辑