随笔分类 -  数据结构

摘要:1、队列的抽象类,虚函数,纯虚函数。class Queue{public: Queue(){}; ~Queue(){}; virtual int EnQueue(int x)=0; virtual int DeQueue(int &x)=0; ... 阅读全文
posted @ 2019-03-21 17:24 UnderScrutiny 阅读(154) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std;struct StackNode{public: char data; struct StackNode *link; StackNode(char d='... 阅读全文
posted @ 2019-03-17 10:58 UnderScrutiny 阅读(278) 评论(0) 推荐(0)
摘要:#include #include using namespace std;struct StackNode{public: int data; struct StackNode *link; StackNode(int d=0,StackNode ... 阅读全文
posted @ 2019-03-17 09:44 UnderScrutiny 阅读(195) 评论(0) 推荐(0)
摘要:#include #include using namespace std;class SeqStack{private: int *elements; int top; int maxSize; void overflowProcess();... 阅读全文
posted @ 2019-03-16 22:39 UnderScrutiny 阅读(129) 评论(0) 推荐(0)
摘要:#include using namespace std;class List;class LinkNode{ friend List;private: LinkNode *link; int data;public: LinkNode(Lin... 阅读全文
posted @ 2019-03-16 21:41 UnderScrutiny 阅读(166) 评论(0) 推荐(0)
摘要://实现顺序表基本功能,然两个顺序表相并#include #include using namespace std;typedef int T;class SeqList{ T *data; int MaxSize; int last;public:... 阅读全文
posted @ 2019-03-15 09:49 UnderScrutiny 阅读(169) 评论(0) 推荐(0)
摘要://冒泡排序#include using namespace std;int main(){ int n; cin>>n; int a[n]; for(int i=0;i>a[i]; } for(int i=0;ia[j]){ ... 阅读全文
posted @ 2019-03-15 09:47 UnderScrutiny 阅读(124) 评论(0) 推荐(0)