随笔分类 -  软件工程实验

数据结构实验,软件构造实验,软件设计实验
摘要:邻接表存储实现图的深度优先遍历 编写程序,实现由邻接表存储实现图的深度优先搜索遍历的功能。顶点为字符型。 输入格式: 第一行输入顶点个数及边的个数,第二行依次输入各顶点,第三行开始依次输入边的两个顶点,用空格分开。最后输入深度优先遍历的起始点。 输出格式: 输出深度优先遍历结果,空格分开,若起始点不 阅读全文
posted @ 2021-11-26 20:35 kuaiquxie 阅读(749) 评论(0) 推荐(0) 编辑
摘要:两栈共享实现 #include <stdio.h> #define MAXSIZE 100 typedef int SElemType; typedef struct{ SElemType data[MAXSIZE]; int top1; //栈1栈顶指针 int top2; //栈2栈顶指针 }S 阅读全文
posted @ 2021-09-22 00:43 kuaiquxie 阅读(43) 评论(0) 推荐(0) 编辑
摘要:顺序表的实现 #include<iostream> #include<string> #include<iomanip> #include <cstdlib> using namespace std; #define OVERFLOW -2 typedef int ElemType; //ElemT 阅读全文
posted @ 2021-09-19 23:34 kuaiquxie 阅读(37) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示