摘要: //插入排序void InsertionSort(int a[], int n){ int i, j, t; for(i = 1; i < n; i++) { t = a[i]; for(j = i; j > 0 && a[j - 1] > t; j--) a[j] = a[j - 1]; a[j] = t; }}template <typename T>void swap(T *x, T *y){ T temp; temp = *x; *x = *y; *y = temp;}//三数中值分割方法int Median3(int a[], int l 阅读全文
posted @ 2013-01-18 11:23 ChobitsSP 阅读(148) 评论(0) 推荐(0)