![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
复习(数据结构:c语言)
LandscapeMi
这个作者很懒,什么都没留下…
展开
-
复习(数据结构):线性表 : C:动态分配内存
#define LIST_INIT_SIZE 10#define LIST_INCREMENT 2struct SqList{ ElemType *elem; //存储空间的基地址 int length; int listsize; //当前分配的存储容量};//初始化//构建空的线性表void InitList(SqList &L){ L.elem=(Ele原创 2016-06-26 10:18:40 · 537 阅读 · 0 评论 -
复习(数据结构):图:c语言:邻接矩阵
#include "stdio.h"#include "stdlib.h"#include "io.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXVEX 100 /* 最大顶点数,应由用户定义 */#define INFIN原创 2016-08-14 12:20:22 · 418 阅读 · 0 评论 -
复习(数据结构):树:C语言
#include "string.h"#include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXSIZE原创 2016-08-14 11:56:42 · 318 阅读 · 0 评论 -
复习(数据结构):字符串:c语言
http://www.cnblogs.com/qq78292959/archive/2013/10/23/3383953.htmlBF复杂度: O[(n−m)m]O[(n-m)m]http://www.tuicool.com/articles/VjMzuqz#include "stdio.h"#include "stdlib.h"#include "math.h"#include"tim原创 2016-07-23 14:16:20 · 368 阅读 · 0 评论 -
复习(数据结构):图:c语言:邻接矩阵DFS和BFS
#include "stdio.h"#include "stdlib.h"#include "io.h"#include "math.h"#include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0typedef int Status; /* Status是函数的类型,其值是函数结果状态代码,如OK等原创 2016-08-16 20:02:29 · 1304 阅读 · 0 评论 -
复习(数据结构):栈:c语言:练习题
共享空间的两栈这里写代码片原创 2016-07-22 11:19:00 · 1006 阅读 · 0 评论 -
复习(数据结构):栈:c语言:动态数组
这里写代码片这里写代码片原创 2016-07-20 11:14:28 · 320 阅读 · 0 评论 -
复习(数据结构):栈:c语言:数组
1. 数据结构 typedef struct{ SElemType data[MAXSIZE]; int top; //头部栈指针 }SqStack;2. 操作栈顶:S.top;初始设置S.top=-1; 栈顶元素S.data[S.top];进栈: 栈不满,栈顶先+1,再送值到栈顶元素出栈:栈非空,先取栈顶元素,再栈顶的指针-1栈空:S.top==-1;栈满条件:原创 2016-07-19 11:54:28 · 308 阅读 · 0 评论 -
复习(数据结构):复杂度
http://blog.csdn.net/mijian1207mijian/article/details/50383481原创 2016-06-19 11:02:06 · 244 阅读 · 0 评论 -
复习(数据结构):链表:c语言
1. 头文件#include "stdio.h" #include "string.h"#include "ctype.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h"#define OK 1#define ERROR 0#define TRUE原创 2016-07-14 12:22:37 · 793 阅读 · 0 评论 -
复习(数据结构):线性表 : C
代码数据结构typedef struct{ ElemType data[MAXSIZE]; int length; //当前线性表的长度}SqList;初始化线性表//初始化线性表Status InitList(SqList *L){ L->length=0; return OK;}//置空线性表Status ClearList(SqList *L){原创 2016-06-25 10:09:18 · 789 阅读 · 0 评论 -
复习(数据结构):动态数组:c_语言数组
1. 数组基础int a[10]={1,2,3,4};int *p=&a[0];int *p=a;//&a[0]=&a=a=p//*p=a[0](*p)++ = p指向的内容+1*(--p)=a[--i]=先自减,再*运算*(p--)=a[i--]=先*p,然后p再--*(++p)=a[++i]=p先自加,再*运算malloc/freeint* p = (int *) malloc (原创 2016-07-10 09:59:56 · 338 阅读 · 0 评论 -
复习(数据结构):图:c语言:邻接表
#include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h"#define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#define MAXVEX 100 /* 最大顶点数,应由用户定义 */typ原创 2016-08-14 12:34:44 · 331 阅读 · 0 评论