摘要:
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 阅读(197) 评论(0) 推荐(0) 编辑
|
||
摘要:
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 阅读(197) 评论(0) 推荐(0) 编辑
摘要:
/// /// 插入排序 /// /// static void insertion_sort(int[] unsorted) { for (int i = 1; i unsorted[i]) ... 阅读全文
posted @ 2015-08-07 01:07 greyhh 阅读(132) 评论(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 阅读(137) 评论(0) 推荐(0) 编辑
摘要:
//冒泡排序 static void BubbleSort(int[] myArray) { for (int i = 0; i myArray[j+1]) { ... 阅读全文
posted @ 2015-08-07 00:54 greyhh 阅读(104) 评论(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 阅读(90) 评论(0) 推荐(0) 编辑 |
||