![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 70
Vw__c
一只菜狗子
展开
-
C++生成二叉树
#include #define N 63 using namespace std; char str[] = "ab#d##c#e##"; int i = -1; typedef struct node { struct node *leftChild; struct node *rightChild; char data; }BiTreeNode, *BiTree; //生成一个原创 2016-04-29 09:05:16 · 538 阅读 · 0 评论 -
二叉树
#include"iostream" #include"stdio.h" using namespace std; typedef struct BiTNode{ char data; struct BiTNode *lchild, *rchild; }BiTNode, *BiTree; /*创建一颗二叉树*/ void CreatBiTree(BiTree *T) { char c; c原创 2016-04-29 09:41:23 · 240 阅读 · 0 评论 -
图的领接矩阵和深度遍历
#include"iostream" using namespace std; const int MaxInt = 32767;//表示极大值 const int MVNum = 100;//最大顶点数 typedef char VerTexType;//假设顶点的数据类型为字符型 typedef int ArcType;//假设权值的数据类型为整型 typedef int Status; ty原创 2016-05-13 09:42:22 · 1520 阅读 · 0 评论