- 博客(8)
- 问答 (1)
- 收藏
- 关注
原创 Radix Sort
Radix sort is effective when the size of elements are short. and it’s steady.#include<bits/stdc++.h> using namespace std;int L[] = {3321,1,10,9680,577,9420,7,5622,4793,2030,3138,82,2599,743,4127}; int
2016-07-31 16:46:48 360
原创 Counting Sort
As for counting sort,we need to know the range of value of the array.It can not be too large. Than we count how many times the element comes. At last, we start from 0 to max value as i, if count[i] is
2016-07-28 00:49:14 266
原创 Quick sort
#include<bits/stdc++.h> using namespace std;int L[] = {3,44,38,5,47,15,36,26,27,2,46,4,19,50,48};void QuickSort(int left,int right){ int l = left; int r = right; if(left>=right){ re
2016-07-27 15:45:47 508
原创 insertion sort
For each time, extract the next unsorted element from 1,2,…n,if current sorted element bigger than unsorted element, move sorted element to the right by 1, or insert the extracted element/* insertio
2016-07-25 22:55:21 182
原创 Sort Algorithm-->Select Sort
Each traversal find the minimal element start from 1 to n,than compare with the index of i,i+1…n-1,if smaller than swap them or next traversal"""select sort languate:python3.5 author:zhoutonglx"""#orig
2016-07-24 23:38:50 213
原创 Sort Algorithm-->Bubble Sort
Bubble sort:Everytime index start from left,compare two elements,if left element bigger then right element,than swap them, or index move to next. After a traverse, the max element of the rest will floa
2016-07-24 20:16:45 296
空空如也
gvim imap 会注释所有文字怎么办
2015-02-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人