数据结构
卑微的自我
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据结构(C/C++)——二叉树(二叉排序树)
实现二叉树的遍历;二叉排序树的生成插入删除原创 2020-07-07 22:07:24 · 264 阅读 · 0 评论 -
数据结构(C/C++)——顺序串
#include<stdio.h>#include<stdlib.h>#include<string.h>#define MaxSize 255typedef struct { char ch[MaxSize]; int length;}String;void StrAssign(String& S,char a[]) { S.length=strlen(a); for (int i = 0; i < S.length; i++) {原创 2020-07-04 20:06:27 · 490 阅读 · 0 评论 -
数据结构(C/C++)——链式存储队列
#include<stdio.h>#include<stdlib.h>typedef int ElemType;typedef struct LinkNode{ ElemType data; struct LinkNode *next;}LinkNode;typedef struct LinkQueue { LinkNode *front, *rear;}LinkQueue;void InitQueue(LinkQueue &Q) { Q.fro原创 2020-07-02 19:51:35 · 263 阅读 · 0 评论 -
数据结构(C/C++)——顺序循环队列
#include<stdio.h>#define MaxSize 20typedef int ElemType;typedef struct{ ElemType data[MaxSize]; int front, rear,size;}SqQueue;bool InitQueue(SqQueue &S) { S.size = 0; S.front = 0; S.rear = 0; return true;}bool EnQueue(SqQueue &a原创 2020-07-02 18:19:24 · 303 阅读 · 0 评论 -
数据结构(C/C++)——链式栈
#include<stdio.h>#include<stdlib.h>typedef int ElemType;typedef struct Linknode { ElemType data; struct Linknode* next;}Linknode, *LiStack;bool InitStack(LiStack &L) { L = (Linknode *)malloc(sizeof(Linknode)); L->data = NULL;原创 2020-07-02 17:52:16 · 182 阅读 · 0 评论 -
数据结构(C/C++)——顺序栈
#include<stdio.h>#define MaxSize 20typedef int ElemType;typedef struct { ElemType data[MaxSize]; int top;}SqStack;void InitSqStack(SqStack& S) { S.top = -1;}bool Push(SqStack& S,ElemType e) { if (S.top == MaxSize - 1) return f原创 2020-07-02 16:57:04 · 157 阅读 · 0 评论 -
数据结构(C/C++)--单链线性表
#include<stdio.h>#include<stdlib.h>#define MaxSize 100typedef int ElemType;typedef struct LNode { ElemType data; struct LNode * next;}LNode ,*LinkeList ;bool InitLIst(LinkeList& L) { L = (LNode*)malloc(sizeof(LNode)); if (L =原创 2020-06-30 22:28:27 · 255 阅读 · 0 评论 -
数据结构(C/C++)——顺序线性表
#include<stdio.h>#include<stdlib.h>#define MaxSize 100#define ok 1#define error -1#define overflow -2typedef int ElemType;typedef struct { ElemType *data; int length;}SeqList;int InitList(SeqList &L){ L.data = new ElemType[Ma原创 2020-06-30 15:52:02 · 174 阅读 · 0 评论
分享