摘要: 快速排序: 冒泡排序: 插入排序: 归并排序: 阅读全文
posted @ 2017-06-14 23:29 燕子不呢喃 阅读(210) 评论(0) 推荐(0) 编辑
摘要: //节点的结构 template struct node { T data; node* next; node():next(nullptr){}; node(T t):data(t),next(nullptr){}; } //模板类构造队列类 template Class Myqueue { public: Myqueue():head(nullptr)... 阅读全文
posted @ 2017-06-14 21:19 燕子不呢喃 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 双端队列补充从头部插入和从尾部删除: 阅读全文
posted @ 2017-06-14 19:39 燕子不呢喃 阅读(222) 评论(0) 推荐(0) 编辑
摘要: template Class MyStack { public: MyStack(int max=50):capa(max){}; void push(T &x); T top(); void pop(); int counts(); bool empty(); ~MyStack(); private: int count; ... 阅读全文
posted @ 2017-06-14 18:13 燕子不呢喃 阅读(262) 评论(0) 推荐(0) 编辑
摘要: //节点的结构 template struct node { T data; node* next; node():next(nullptr){}; node(T t):data(t),next(nullptr){}; } //模板类构造栈类 template Class MyStack { public: MyStack(); void pu... 阅读全文
posted @ 2017-06-14 17:30 燕子不呢喃 阅读(283) 评论(0) 推荐(0) 编辑