摘要: 11classProgram2{3staticvoidMain(string[]args)4{5int[]iArrary=newint[]{1,5,13,6,10,55,99,2,87,12,34,75,33,47};6ShellSortersh=newShellSorter();7sh.Sort(iArrary);8for(intm=0;m<iArrary.Length;m++)9Console.Write("{0}",iArrary[m]);10Console.ReadLine();11}12}2.1classShellSorter2{3///<summar 阅读全文
posted @ 2013-05-17 14:29 yellowshorts 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 1.1classProgram2{3staticvoidMain(string[]args)4{5int[]iArrary=newint[]{1,13,3,6,10,55,98,2,87,12,34,75,33,47};6InsertionSorterii=newInsertionSorter();7ii.Sort(iArrary);8for(intm=0;m<iArrary.Length;m++)9Console.Write("{0}",iArrary[m]);10Console.ReadLine();11}12}2.1classInsertionSorter2{3 阅读全文
posted @ 2013-05-17 14:27 yellowshorts 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.1classProgram2{3staticvoidMain(string[]args)4{5int[]iArrary=newint[]{1,5,3,6,10,55,9,2,87,12,34,75,33,47};6SelectionSorterss=newSelectionSorter();7ss.Sort(iArrary);8for(intm=0;m<iArrary.Length;m++)9{10Console.Write("{0}",iArrary[m]);11}12Console.ReadLine();13 }14}2.选择排序1classSelection 阅读全文
posted @ 2013-05-17 14:24 yellowshorts 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 主程序入口classProgram{staticvoidMain(string[]args){int[]iArrary=newint[]{1,5,13,6,10,55,99,2,87,12,34,75,33,47};//定义数组BubbleSortersh=newBubbleSorter();sh.Sort(iArrary);for(intm=0;m<iArrary.Length;m++)//输出结果Console.Write("{0}",iArrary[m]);Console.ReadLine();} }冒泡排序方法1classBubbleSorter2{3///& 阅读全文
posted @ 2013-05-17 14:20 yellowshorts 阅读(151) 评论(0) 推荐(0) 编辑