![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构与算法
文章平均质量分 86
风之轻吟2013
这个作者很懒,什么都没留下…
展开
-
算法--自己写快排模板与C++快排库函数使用
#include typedef struct{ int num; int grade;}STUDENT_INFO_T;STUDENT_INFO_T student[101];//声明一个COMP类型函数指针 以后就可以直接用COMP定义该函数指针 typedef int (*COMP)(const STUDENT_INFO_T *, const STUDENT_INFO原创 2014-11-13 10:25:11 · 11567 阅读 · 0 评论 -
算法--简单排序算法总结与模板
#include #include #include int a[]={223, 34, 23, 2, 21, 55, 87, 533 , 213, 111};//int a[]={2, 21, 23, 34, 55, 87, 111, 213, 223, 533};//int a[]={533, 223, 213, 111, 87, 55, 23, 34 , 2原创 2014-12-03 14:26:31 · 9020 阅读 · 0 评论 -
算法--堆排序学习以及模板
堆排序学习以及模板#include #include int getParent(int i){ return (int)(i/2); }int getLeftSon(int i){ return (i*2);}int getRightSon(int i){ return (i*2 + 1);}void PrintHeap(i原创 2014-11-19 17:49:52 · 9293 阅读 · 0 评论