
基本数据结构实现
数据结构实现
鱼儿冒个泡
这个作者很懒,什么都没留下…
展开
-
【数据结构】图
无向图的邻接矩阵和邻接表实现 #include<iostream> #include<exception> using namespace std; class OutOfRange:public exception { public: const char* what()const throw() { return "OUT OF RANGE.\n"; } }; class BadSize:public exception { p原创 2021-07-19 11:12:30 · 113 阅读 · 0 评论 -
【数据结构】 树
#include<iostream> #include<exception> using namespace std; template<class T> class binaryTree { public: virtual void clear() = 0; virtual bool empty()const = 0; virtual int height()const = 0; virtual int size()const = 0;原创 2021-07-08 15:22:22 · 103 阅读 · 0 评论 -
【数据结构】优先队列
#include<iostream> #include<exception> using namespace std; class OutOfRange:public exception { public: const char* what()const throw() { return "ERROR! OUT OF RANGE.\n"; } }; class BadSize:public exception { public: const原创 2021-07-07 14:37:57 · 115 阅读 · 0 评论 -
【数据结构】 堆
#include<iostream> #include<exception> using namespace std; class OutOfRange:public exception { public: const char* what()const throw() { return "ERROR! OUT OF RANGE.\n"; } }; class BadSize:public exception { public: const原创 2021-07-07 14:37:01 · 76 阅读 · 0 评论 -
【数据结构】队列
今天复习了顺序表、栈、队列 明天复习堆与优先队列、二叉树 #include<iostream> #include<exception> using namespace std; class OutOfRange:public exception { public: const char* what()const throw() { return "ERROE! OUT OF Range.\n"; } }; class BadSize:public原创 2021-07-06 22:23:38 · 89 阅读 · 0 评论 -
【数据结构】栈
刚刚获得消息转专业考试五道大题,手写代码,太难了。。。 #include<iostream> #include<exception> using namespace std; class OutOfRange:public exception { public: const char* what()const throw() { return "ERROE! OUT OF Range.\n"; } }; class BadSize:public原创 2021-07-06 21:35:01 · 116 阅读 · 0 评论 -
【数据结构】顺序表
转专业考试前集中复习一下数据结构,顺带复习一下继承和多态 #include<iostream> #include<exception> using namespace std; class outOfRange:public exception { public: const char* what()const throw() { return "ERROR! OUT OF RANGE!.\n"; } }; class badSize:publi原创 2021-07-06 18:42:36 · 115 阅读 · 0 评论