经典算法
einstein991225
这个作者很懒,什么都没留下…
展开
-
Bubble Sort
Bubble sort is a simple and well-known sorting algorithm. It is used in practice once in a blue moon and its main application is to make an introduction to the sorting algorithms. Bubble sort belongs转载 2012-04-03 11:06:23 · 879 阅读 · 0 评论 -
Selection Sort
Selection sort is one of the O(n2) sorting algorithms, which makes it quite inefficient for sorting large data volumes. Selection sort is notable for its programming simplicity and it can over perform转载 2012-04-03 11:15:32 · 1449 阅读 · 0 评论 -
Insertion Sort
Insertion sort belongs to the O(n2) sorting algorithms. Unlike many sorting algorithms with quadratic complexity, it is actually applied in practice for sorting small arrays of data. For instance, it转载 2012-04-03 11:18:19 · 901 阅读 · 0 评论 -
Quicksort
original website:http://www.algolist.net/Algorithms/Sorting/QuicksortQuicksort is a fast sorting algorithm, which is used not only for educational purposes, but widely applied in practice. On the av转载 2012-04-02 22:05:15 · 2895 阅读 · 0 评论 -
冒泡排序
void BubbleSort(int arr[],int count){ int temp=0; bool swapped=false; for(int i=1;i<count;i++) { swapped=false; for(int j=count-1;j>=i;j--) { if(arr[j-1]>arr[j]) { temp=arr[j-1];原创 2012-09-08 00:18:58 · 397 阅读 · 0 评论