- 博客(11)
- 问答 (1)
- 收藏
- 关注
原创 C++数据结构之图的深度和广度遍历
#include #include using namespace std; const int MaxLen=20; bool Visit[MaxLen]; //记录节点是否被访问int Matrix[MaxLen][MaxLen];//邻接矩阵 int Vexnum;//记录节点的数量 void DFS(int v) { in
2015-12-25 17:08:54 669
原创 C++数据结构图的深度遍历
#include #include using namespace std; const int MaxLen=20; bool Visit[MaxLen]; //记录节点是否被访问int Matrix[MaxLen][MaxLen];//邻接矩阵 int Vexnum;//记录节点的数量 void DFS(int v) { int w,i,k;
2015-12-25 15:41:26 749
原创 C++二叉树的构建及求深度,叶子数量,层次遍历
includeincludeincludeincludeusing namespace std; struct Tree { char info; Tree *Left; Tree *Right; }; int pos=0; int sum=0; Tree *Root; string strTree; void initString(string s)
2015-12-22 21:55:16 1360
原创 java学习之内部类
public class Study {String name="Hello"; void study() { System.out.println("inner name:="+name);//外部类不能直接访问内部类的变量和方法 show();//这样写是错误的 }clas
2015-12-18 20:26:18 392
原创 文章标题
include using namespace std;const int MAX_LEN = 20;struct SqBTree{ int length; int value[MAX_LEN]; int height; }; void createSqBTree(SqBTree &sqbt,int v[],int n){ int i, flag = 1;
2015-11-05 00:37:46 369
原创 C++ 二叉树 叶子节点
includeincludeincludeusing namespace std; int sum=0; int pos=0; struct node { char info; node*R; node*L; }; class tree { public: node* Root; string str; node*create(
2015-11-05 00:14:30 921
原创 C++,二叉树,叶子节点
#include#include#includeusing namespace std;int sum=0;int pos=0;struct node{char info;node*R;node*L;};class tree{public:node* Root;string str; node*create() {
2015-11-05 00:06:27 558
原创 多项式相加
#includeusing namespace std;struct linknode{int xishu;int zhishu;linknode*next;};linknode*create(int n,linknode*head){linknode*newnode,*current;head=new linknode;head=NULL;in
2015-11-03 01:27:22 501
原创 C++链表的分类排序
includeusing namespace std; struct linknode { char info; int sub; linknode *next; }; class Link { private: linknode *newnode,*newnode1,*current,*current1,*current2,*current3,*
2015-11-02 13:53:08 523
原创 欢迎使用CSDN-markdown编辑器
欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl
2015-11-02 13:51:27 388 1
原创 哈夫曼编码及解码
#include#include#includeusing namespace std;const int MaxW=9999;class HuffNode{public: int weight;char name; int parent; int lchild; int rchild;};class HuffMan
2015-11-01 15:50:21 1338
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人