greyhh

记录学习中的点点滴滴

导航

2015年8月7日

摘要: static void shell_sort(int[] unsorted, int len) { int group, i, j, temp; for (group = len / 2; group > 0; group /= 2) ... 阅读全文

posted @ 2015-08-07 01:11 greyhh 阅读(194) 评论(0) 推荐(0) 编辑

摘要: /// /// 插入排序 /// /// static void insertion_sort(int[] unsorted) { for (int i = 1; i unsorted[i]) ... 阅读全文

posted @ 2015-08-07 01:07 greyhh 阅读(131) 评论(0) 推荐(0) 编辑

摘要: public static int BinarySearch(int[] arr, int low, int high, int key){ int mid = (low + high) / 2; if (low > high) return -1; else ... 阅读全文

posted @ 2015-08-07 00:58 greyhh 阅读(135) 评论(0) 推荐(0) 编辑

摘要: //冒泡排序 static void BubbleSort(int[] myArray) { for (int i = 0; i myArray[j+1]) { ... 阅读全文

posted @ 2015-08-07 00:54 greyhh 阅读(102) 评论(0) 推荐(0) 编辑

摘要: //选择排序 static void SelectSort(int[] myArray) { int smallIndex; for (int i = 0; i < myArray.Length-1; i++) ... 阅读全文

posted @ 2015-08-07 00:54 greyhh 阅读(89) 评论(0) 推荐(0) 编辑

摘要: //递归算法 //0,1,1,2,3,5,8,13.... static int Recursion(int i) { if (i0 && i<=2) { re... 阅读全文

posted @ 2015-08-07 00:53 greyhh 阅读(227) 评论(0) 推荐(0) 编辑