- 博客(8)
- 资源 (3)
- 收藏
- 关注
原创 交换排序 --C语言数据结构
#include #include void swap(int *p1,int *p2);void bubble_sort(int *a,int n);/*函数功能:使用交换法进行排序:从小到大; 函数原型:void swap_sort(int *a,int n) 函数参数:int *a:数组名 int n :排序元素数 函数返回值:void 作者 : 李文塔 Wen
2008-08-20 09:51:00 1168
原创 归并排序 C语言数据结构
#include #include #define N 10void merge(int *a1,int a1_start,int *a2,int a2_start, int a2_end,int *a3,int a3_start,int a3_end); void merge_sort(int *a,int left,int right);/*
2008-08-20 09:49:00 2747
原创 二叉树排序 --C语言数据结构
#include #include typedef struct btree{ int data; struct btree *left; struct btree *right; }BTR,*PBTR;typedef struct BTRSt{ PBTR ptree; struct BTRSt *link;}Stack,*PStack;PBTR Bitree=NULL;/*函数
2008-08-20 09:48:00 3370
原创 选择排序 --C语言数据结构
#include #include void swap(int *p1,int *p2);void select_sort(int *a,int n);/*函数功能:使用选择排序法进行排序:从小到大; 函数原型:void select_sort(int *a,int n) 函数参数:int *a:数组名 int n :排序元素数 函数返回值:void 作者 : 李文塔
2008-08-20 09:45:00 2360 4
原创 基数排序 C语言数据结构
#include #define N 10/*函数功能:求一个整数的第K位的值 函数原型:int digitk(int no,int k)函数参数:函数返回值:返回数据的位数 作者 : 李文塔 Wenta Li 日期: 2008年5月21日 11:19 */int digitk(int no,int k){ int i,j,m; if(k==0) { return no%10
2008-08-20 09:44:00 2282 4
原创 冒泡排序 C数据结构
#include #include void swap(int *p1,int *p2);void bubble_sort(int *a,int n);/*函数功能:使用冒泡法进行排序:从小到大; 函数原型:void bubble_sort(int *a,int n) 函数参数:int *a:数组名 int n :排序元素数 函数返回值:void 作者 : 李文塔 W
2008-08-20 09:42:00 6268
原创 插入排序 --C数据结构
#include #include void swap(int *p1,int *p2);void insert_sort(int *a,int n);/*函数功能:使用插入法进行排序:从小到大; 函数原型:void insert_sort(int *a,int n) 函数参数:int *a:数组名 int n :排序元素数 函数返回值:void 作者 : 李文塔 W
2008-08-20 09:39:00 2134
原创 快速排序----C语言数据结构
#include #include void swap(int *p1,int *p2);void quick_sort(int *a,int left,int right);/*函数功能:使用快速排序法进行排序:从小到大; 函数原型:void quick_sort(int *a,int left,int right) 函数参数:int *a:数组名 int left:排
2008-08-20 09:37:00 2638
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人