- 博客(4)
- 收藏
- 关注
原创 表达式求值
实验内容: 1、定义顺序栈; 2、用顺序栈实现表达式求值; 实验基本要求: 掌握栈的特性和栈结构的入栈和出栈等操作,掌握栈在表达式求值中的应用 #include #include using namespace std; #define MaxSize 50 #define MaxOp 7 struct{ char ch; int pri; }lpri[]={{
2015-06-09 14:26:04
512
原创 线性表的基本操作(单链表)
要求同顺序表: #include using namespace std; #include #include #define MaxSize 50 typedef char ElemType; typedef struct LNode //定义单链表结点类型 { ElemType data; struct LNode *next; } LinkList;
2015-06-04 18:47:08
1119
原创 线性表的基本操作(顺序表)
实验内容: 建立顺序表,实现求表的长度、遍历表、查找、插入和删除元素、求前驱、求后继等操作; 实验基本要求: 进一步熟悉Turbo C或者VC++环境; 掌握线性表结构的基本操作 #include using namespace std; #include #include #define MaxSize 50 typedef char ElemType; type
2015-06-04 18:41:02
912
原创 二叉树的建立及其基本操作
实验内容: 1、按照前序次序建立一棵二叉树; 2、用前、中、后序递归遍历的方法遍历二叉树; 3、求二叉树的深度; 4、求二叉树的所有结点数; 实验基本要求: 掌握二叉树的链式存储结构的建立方法和对二叉树的各种操作算法 #include #include #define MaxSize 100 typedef char ElemType; /*二叉树的链式存储结构*/
2015-06-03 19:11:53
2134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人