摘要: 一些基本排序算法的C实现void Swap(int *a, int *b){ int temp = *a; *a = *b; *b = temp;}#pragma mark - Bubblevoid BubbleSort(int a[], int n){ int i, j, temp; for (j = n-1; j > 0; j--) { for (i = 0; i a[i+1]) { temp = a[i+1]; a[i+1] = a[i]; a[i] = ... 阅读全文
posted @ 2014-04-04 11:46 馒不头 阅读(142) 评论(0) 推荐(0) 编辑