![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构学习
文章平均质量分 63
weixin_37629738
这个作者很懒,什么都没留下…
展开
-
数据结构--多项式的逆波兰计算器
这个题目挺简单的。但是由于我是第一次用C++写程序,花了大概15个小时做这个题目。初步弄清楚了C++中类模板的使用方式。然后通过实践,觉得类的继承是非常好用的东西。但是还是有一些莫名其妙的东西。直接放代码main.cpp#include #include //for tolower()using namespace std;#include "polynomial.原创 2017-03-28 15:23:22 · 905 阅读 · 0 评论 -
数据结构学习 65页 P1
实现代码:stack.h#include "utility.h"#include "typedef.h"const int maxstack = 10;class Stack{public: Stack(); Error_code pop(); Error_code push(const Stack_entry &item); Error_co原创 2017-03-12 17:13:52 · 205 阅读 · 0 评论 -
数据结构学习 65页 P2
实现代码:main.cpp#include #include "stack.h"#include using namespace std;int main(){ Stack s; int n; int k; cin>>n; k = 2; while(n>1){ if(n%k == 0){ s原创 2017-03-12 17:15:53 · 278 阅读 · 0 评论 -
数据结构与程序设计 看不懂的地方汇总
文章链接 点击打开链接原创 2017-03-12 17:36:36 · 392 阅读 · 0 评论 -
数据结构第一次月考
值得一提的是在第三题的归并排序里面设置了一个dummy Node 可以让程序更加的简洁。1 (30分)typedef int Node_entry;struct Node { Node_entry data; struct Node *next;};void delredundant(struct Node * head){ struct Node *p,*q,原创 2017-03-27 08:38:58 · 392 阅读 · 0 评论 -
8皇后问题的传统解决方法
#include #include using namespace std;void print_information();void solve_from(Queens & configuration);int main()/* Pre: The user enters a valid board size.* Post: All solutions to the n-que原创 2017-04-15 16:58:13 · 339 阅读 · 0 评论