- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 稀疏矩阵的数据结构
#include<iostream> using namespace std; #define MAXSIZE 100 /*--------稀疏矩阵--------*/ typedef struct { int i, j; int e; }Triple; typedef struct { Triple data[MAXSIZE + 1];//data[0]未使用 int mu...
2019-09-17 23:34:19
879
原创 循环队列-队列的链式表示及实现
#include<iostream> using namespace std; #define MAXQSIZE 100 //q.rear+1=q.front则队列满 typedef struct { int *base;//循环链表空间 int front;//头指针,指向首元素,直接用下标指向链表空间,因此循环队列是基于数组实现的 int rear;//尾指针,指向最后一个元...
2019-09-16 23:29:40
402
原创 队列的链式表示和实现
#include<iostream> using namespace std; /*头结点指向第一个空QNode*/ typedef struct QNode//数据结构 { int data; struct QNode *next; }QNode,*Queueptr; typedef struct//操作 { Queueptr front; Queueptr rear; }L...
2019-09-16 23:28:24
255
原创 栈的顺序表示及应用
#include<iostream> using namespace std; #define STACK_INIT_SIZE 100 #define STACKINCREASE 10 typedef struct { int *base; int *top; int stacksize;//当前已分配存储空间 }SqStack; bool InitStack(SqStack ...
2019-09-15 23:36:22
170
原创 从实际应用角度出发重新定于线性链表及其基本操作
根据严蔚敏数据结构(C语言版)第37页改写 #include<iostream> using namespace std; #define ElemType int typedef struct LNode//结点 { ElemType data; struct LNode *next; }*Link, *Position; typedef struct//链表 { L...
2019-09-11 18:42:27
220
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人