摘要:
代码 C语言 include define N 8 define ElemType int / 简单选择排序 / void SelectSort(ElemType A[], int n) { int i,j,min,x; for (i = 0; i 阅读全文
摘要:
代码 C语言 include define N 9 define ElemType int / 希尔排序 / void ShellSort(ElemType A[],int n) { int i,j,dk; for (dk = n / 2; dk = 1; dk = dk / 2) for (i = 阅读全文
摘要:
代码 C语言 include / 一趟快速排序 / define N 8 define ElemType int int Partition(ElemType A[], int low, int high) { int pivot = A[low]; while (low= pivot) high; 阅读全文
摘要:
代码 C语言 include define N 8 define ElemType int / 冒泡排序 / void InsertSort(ElemType A[],int n) { int i,j,temp; bool flag; for (i = 0; i i; j) if (A[j 1] A 阅读全文
摘要:
代码 C语言 include define N 9 define ElemType int / 折半插入排序 / void BinarySort(ElemType A[], int n) { int i,j,low , high ,mid; for (i = 2; i A[0]) high = mi 阅读全文