![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
不秃头也能变强
二把刀程序员
展开
-
王道数据结构 循环队列
#include <iostream>#include<stdio.h>#define MaxSize 50using namespace std;typedef struct { int front, rear; int data[MaxSize];}sqQueue;void InitQueue(sqQueue &Q) { Q.front = 0; Q.rear = 0;}bool isEmpty(sqQueue &Q) { //判空原创 2021-05-16 00:33:28 · 186 阅读 · 0 评论 -
王道数据结构 顺序队列基本操作
#include <iostream>#include<stdio.h>#define MaxSize 50using namespace std;typedef struct { int data[MaxSize]; int front, rear;}SqQueue;void InitQueue(SqQueue &Q) { //初始化 Q.front = 0; Q.rear = 0;}bool QueueEmpty(SqQueue &原创 2021-05-15 23:44:42 · 199 阅读 · 0 评论 -
王道数据结构 顺序栈基本操作
#include <iostream>#include<stdio.h>#define MaxSize 50 //定义栈中元素的最大个数using namespace std;typedef struct { int data[MaxSize]; //存放栈中的元素 int top; //栈顶指针}SqStack;void InitStack(SqStack &s) { //初始化 s.top = -1;}bool StackEmpty(SqSt原创 2021-05-15 21:17:27 · 205 阅读 · 0 评论 -
王道数据结构:带头结点的单链表基本操作
#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include<stdio.h>using namespace std;typedef struct LNode { int data; struct LNode *next;}LNode,*LinkList;//LNode 强调节点//LinkList 强调链表bool InitList(LinkList &L) {//初始化 L = (LNod原创 2021-04-11 16:32:49 · 247 阅读 · 0 评论 -
数据结构:王道+严蔚敏 顺序表基本操作
#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include<stdio.h>#include<time.h>#define MaxSize 10 //定义最大长度using namespace std;typedef struct { int date[MaxSize];//用静态的“数组存放数据元素” int length; //顺序表的当前长度}SqList; //顺序表的类型定义vo原创 2021-04-05 23:16:26 · 596 阅读 · 0 评论