数据结构
m0_37032564
这个作者很懒,什么都没留下…
展开
-
C语言排序
#include#define N 10void swap(int *p1, int *p2);void BubbleSort(int *a);void SelectSort(int a[]);void QuickSort(int *a, int left, int right);int main(){ int a[N] = {3,6,9,8,5,3,1,6,0,2}; int原创 2017-04-23 22:47:19 · 134 阅读 · 0 评论 -
查找之折半查找
#include#define N 10void QuickSort(int a[],int left, int right);int BinSearch(int a[], int low, int high, int key);int main(){ int a[N] = {2,8,4,9,7,6,5,3,1,0}; int j = 0, i; QuickSort(a, 0,原创 2017-04-23 22:48:38 · 107 阅读 · 0 评论