摘要:
各种排序实现,无聊写出来,留个念像。 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #define SORT_ARRAY_SIZE 40 5 #define SWAP(a, b, temp) (temp) = (a); (a) = (b); (b) = (temp); 6 7 void heapSort(int *array, int size); 8 void adjustHeap(int *array, int root, int size); 9 void quickSort(int *array, int begi 阅读全文