Merge Sort
摘要:实现如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#regionMergeSortprivatestaticvoidMerge(int[]data,intstartIndex1,intendIndex1,intstartIndex2,int...
阅读全文
Heap Sort
摘要:堆积排序是对直接选择排序的一种改进,具体实现如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-- #regionHeapSortprivatestaticvoidAdjust(int[]data,introotIndex,intlastI...
阅读全文
Shell's Sort
摘要:谢尔排序又称减小增量排序法,是对直接插入排序法的改进。具体实现如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///谢尔排序///</summary>///<paramname="data...
阅读全文
Bubble Sort
摘要:最简单的排序方式,实现如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///冒泡排序///</summary>///<paramname="data"></param>p...
阅读全文
Selection Sort
摘要:选择排序法核心思想是:每一趟排序选择未排序元素中最小元素作为已排序部分的一个新元素。具体实现如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///选择排序///</summary>///<...
阅读全文
Quick Sort
摘要:快速排序是对冒泡排序的一种改进。它基于分治策略,对于要排序的一个序列,从中选一值进行排序,将其放入到正确的位置position。然后以position为界,对左右两部分再分别做排序。直到划分的长度为1。具体实现如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighte...
阅读全文
C#的Convert.ToInt32实现
摘要:以下是Convert.ToInt32(String str)的个人实现:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicclassConvertHelper{privateconstintPOSITIVE_SIGN_NUM=43;pr...
阅读全文
Insertion Sort
摘要:1. 直接插入排序算法:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///插入排序///</summary>///<paramname="data"></param>pu...
阅读全文
important在css中的作用
摘要:例一: CSS #box{ color:red !important;color:blue; } HTML <divid="Box">在不同的浏览器下,这行字的色应该不同!</div> 这个例子应该是大家经常见到的important的用法了,在IE环境下,这行字是蓝色,在firefox下,为红色,其用法不再多说了,看下一个例子。 例二: CSS 1#boxdi...
阅读全文
Vertical Centering in CSS
摘要:Though there is a CSS property vertical-align, it doesn't work like attribute valign in HTML tables. CSS property vertical-align doesn't seem to be able to solve this problem:Definition of the problem...
阅读全文