随笔分类 -  数据结构

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Sort{ class Program { static void Main(string[] args) { int[] myData = { 1000, 3, 55, 33, 4, 34, 344, 23, 33... 阅读全文
posted @ 2010-11-05 18:43 oneroom 阅读(216) 评论(0) 推荐(1)
摘要:转自:数据结构-排序: 各种排序算法全分析排序简介排序是数据处理中经常使用的一种重要运算,在计算机及其应用系统中,花费在排序上的时间在系统运行时间中占有很大比重;并且排序本身对推动算法分析的发展也起很大作用。目前已有上百种排序方法,但尚未有一个最理想的尽如人意的方法,本章介绍常用的如下排序方法,并对它们进行分析和比较。1、插入排序(直接插入排序、折半插入排序、希尔排序);2、交换排序(起泡排序、快... 阅读全文
posted @ 2010-11-05 10:40 oneroom 阅读(225) 评论(0) 推荐(0)
摘要:static void Main(string[] args) { int[] myNum = new int[100]; myNum = GetRand(1, 100, 100); Array.Sort(myNum); foreach (int item in myNum) { Console.WriteLine(item); } Console.ReadKey(); return; } pu... 阅读全文
posted @ 2010-11-05 09:02 oneroom 阅读(374) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--classBubbleSort{publicintcount=0;publicvoidSort(int[]arr){inti,j,temp;booldone=true;j=1;while((j<... 阅读全文
posted @ 2010-03-19 10:12 oneroom 阅读(296) 评论(0) 推荐(0)

让别人快乐是慈悲,让自己快乐是智慧!