数据结构
chenglei12
这个作者很懒,什么都没留下…
展开
-
数据结构(C语言版)严蔚敏算法 邻接矩阵C++实现
图邻接矩阵创建二级目录三级目录 邻接矩阵创建 二级目录 三级目录 下面展示一些 内联代码片。 #include<iostream> using namespace std; #define Maxint 32767 #define Maxver 20 typedef int Vertype; typedef int Edgetype; class Graph { private: Vertype verlist[Maxver]; Edgetype edgelist[Maxver][Maxv原创 2022-03-12 20:24:47 · 1579 阅读 · 1 评论 -
数据结构(C语言版)严蔚敏算法(第三章)C++实现
这里写自定义目录标题栈和队列3.1 栈借鉴 栈和队列 这是书中第三章的例子,后面的后继续更新。 3.1 栈 源文件 #include "s1.h" int main() { int n = 5; int arr[] = { 1,2,3,4,5 }; Sqstack s1; s1.InitStack(arr, n); cout << s1 << endl; return 0; } 头文件 #pragma once #include<原创 2022-01-13 18:15:08 · 409 阅读 · 0 评论 -
数据结构(C语言版)严蔚敏算法(第二章)C++实现(书中的格式)
小白一枚,希望和大家共同学习进步,能够指出我的不足。 这里析构函数总是报错,说触发了一个断点,注释了析构函数就不报错了,老哥们知道怎么回事吗, 头文件。 #pragma once #include<iostream> using namespace std; #define Maxsize 100 #define LISTINCREMENT 1000 class SqList { protected: int* elem; int length; int listSize; public原创 2021-12-30 22:00:43 · 870 阅读 · 0 评论 -
数据结构(C语言版)严蔚敏算法(第二章)C++实现
欢迎大家一起交流,本人小白,很多东西都不懂,大家一起加油进步 算法 2.1 算法 2.1 #include<iostream> using namespace std; int main() { int LA[] = { 8,11 }; int LB[] = { 9,11,15,20 }; int LC[100]; int i = 0, j = 0, k = 0; int al = sizeof(LA) / sizeof(*LA); int bl = sizeof(LB).原创 2021-12-30 17:59:57 · 532 阅读 · 0 评论