![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构与算法
吃是哲学
这个作者很懒,什么都没留下…
展开
-
线性表-顺序
c语言实现:#include #include #define INITIAL 100#define ADD 10typedef char elemType;struct List{ elemType *elem; //存储空间基址 int length; //目前长度 int listsize; //当前已分配的存储容量}SqList;void C原创 2015-02-06 13:32:12 · 261 阅读 · 0 评论 -
关于malloc
malloc()函数是c语言标准库函数中的一个动态分配内存的函数,在M$的标准里这个函数是在名为的头文件中,iso标准的话在头文件中原创 2015-02-08 14:48:33 · 783 阅读 · 0 评论 -
线性表-链式
c语言:#include typedef int ElemType;struct Node{ ElemType data; Node *next;};void Create(Node *LNode,int length){ Node *p; for (int i = 0; i < length; i++) { p = (Node*)malloc(sizeof(原创 2015-02-12 17:46:27 · 352 阅读 · 0 评论 -
选择排序
#include #include #include #define N 10void create_random(int ran[], int num){ srand(time(0)); while (num > 0){ ran[num - 1] = rand() % 100; num--; }}int main(void){ int num[N],min,te原创 2015-03-30 23:32:22 · 274 阅读 · 0 评论 -
插入排序
#include #include #include #define N 10void create_random(int ran[], int num){ srand(time(0)); while (num > 0){ ran[num - 1] = rand() % 100; num--; }}int main(void){ int num[N], min,原创 2015-03-30 23:39:32 · 229 阅读 · 0 评论