2015年11月28日

摘要: //图//储存结构:邻接矩阵#include #include #include #include #include "queue.cpp"using namespace std;#define INF 1000000#define MAX_NAME 12#define MAX_INFO 26#de... 阅读全文

posted @ 2015-11-28 12:43 `Elaine 阅读(293) 评论(0) 推荐(0) 编辑

已知二叉树的先序,中序遍历,求后续遍历

摘要: //已知二叉树的先序,中序遍历,求后续遍历struct TreeNode{ char elem; struct TreeNode* left; struct TreeNode* right;};TreeNode* BinaryTree(char* inorder,char* pre... 阅读全文

posted @ 2015-11-28 12:43 `Elaine 阅读(304) 评论(0) 推荐(0) 编辑

二叉树

摘要: //二叉树//储存结构:顺序表#include #include #include #include #include using namespace std;#define MAX_TREE_SIZE 100 //二叉树的最大节点数#define Clear Init //顺序存储中两函数完全一样... 阅读全文

posted @ 2015-11-28 12:41 `Elaine 阅读(198) 评论(0) 推荐(0) 编辑

链式队列 + 顺序队列 + 顺序循环队列

摘要: #include #include #define OK 1#define FALSE 0#define ERROR -1typedef int Status;typedef int QElemType;typedef struct QNode{ QElemType data; QNod... 阅读全文

posted @ 2015-11-28 12:40 `Elaine 阅读(297) 评论(0) 推荐(0) 编辑

顺序串

摘要: //顺序串#include #include #include #include using namespace std;#define OK 1#define FALSE 0#define ERROR -1#define MAXSTRLEN 40typedef int Status;typedef... 阅读全文

posted @ 2015-11-28 12:40 `Elaine 阅读(179) 评论(0) 推荐(0) 编辑

顺序栈(进制转换 + 括号匹配 + 判断栈表 + 最长括号匹配长度)

摘要: #include #include #include using namespace std;#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#defi... 阅读全文

posted @ 2015-11-28 12:37 `Elaine 阅读(341) 评论(0) 推荐(0) 编辑

顺序表

摘要: #include #include using namespace std;#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#define LIST_I... 阅读全文

posted @ 2015-11-28 12:36 `Elaine 阅读(212) 评论(0) 推荐(0) 编辑

单链表

摘要: #include #include using namespace std;#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2typedef int St... 阅读全文

posted @ 2015-11-28 12:36 `Elaine 阅读(161) 评论(0) 推荐(0) 编辑

将完全二叉树的数组形式改为链表形式

摘要: /* * 二叉树 * * (将完全二叉树的数组形式改为链表形式) * * 1 * 2 3 * 4 5 6 ... 阅读全文

posted @ 2015-11-28 12:34 `Elaine 阅读(1534) 评论(0) 推荐(0) 编辑

二叉排序树

摘要: 二叉排序树/************************************************************************* 这是一个二叉查找树,实现了以下操作:插入结点、构造二叉树、删除结点、查找、 查找最大值、查找最小值、查找指定结点的前驱和后继。上述所有操... 阅读全文

posted @ 2015-11-28 12:34 `Elaine 阅读(167) 评论(0) 推荐(0) 编辑

二叉树排序树的的构造和查找

摘要: /********************************************************* 二叉树排序树的的构造和查找*********************************************************/#include #i... 阅读全文

posted @ 2015-11-28 12:33 `Elaine 阅读(579) 评论(0) 推荐(0) 编辑

排序 折半,冒泡 快排

摘要: 折半插入排序:/*********************************************** 折半插入排序***********************************************/#include#include#include#includ... 阅读全文

posted @ 2015-11-28 12:32 `Elaine 阅读(324) 评论(0) 推荐(0) 编辑

导航