![](https://img-blog.csdnimg.cn/20190927151043371.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
我的数据结构课专题实验
我 走路带风
个人博客szl.zone
展开
-
dijstra算法
#include<iostream> using namespace std; #define maxvalue 100000; class link //后结点 { public: int end; int len; link *next; }; class head //头结点 { public: link* first = NULL; }; class g...原创 2019-11-25 10:30:05 · 212 阅读 · 0 评论 -
二叉查找树的几个操作
这里是题目的图片 #include<iostream> #include<string.h> using namespace std; class Node // 结点类定义 { public: int value; int ceng; Node *left; Node *right; Node(int value1) { ceng = 1; v...原创 2019-11-23 22:45:55 · 138 阅读 · 0 评论 -
不考虑价值背包问题
@最简单不考虑价值背包问题 原题目为 假设有一个能装入总体积为T的背包和N件体积分别任w1、w2、w3、……wn的物品,能否从n件物品中挑选若干件恰好装满背包,即w1+w2+……Wn = T,要求满足上述条件的解。 例如,当T = 10,各件物品的体积为{1、8、4、3、5、2}时,可以 找到下列4组解: (1,4,3,2)、(1,4,5)、(8,2)、(3,5,2) 代码如下 #include&...原创 2019-10-31 13:11:08 · 1308 阅读 · 0 评论 -
哈夫曼树的生成以及编码
哈夫曼树的生成以及编码 #include <stdio.h> #include <stdlib.h> #include <string.h> #include<iostream> using namespace std; typedef int ELEMTYPE; typedef struct HuffmanTree { ELEMTYPE wei...原创 2019-11-11 00:08:45 · 1339 阅读 · 2 评论