摘要:
一些基本排序算法的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] = ... 阅读全文