
树
·
遇见生活222
此号不用
展开
-
树的静态写法
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5+10; struct node{ int data;// 数据域 int lchild; // 指向左子树的指针域 int rchild; // 指向右子树的指针域 }Node[maxn]; // 节点数组,maxn为节点上限个数 in...原创 2019-10-16 14:50:54 · 248 阅读 · 0 评论 -
树的一些操作
#include <iostream> using namespace std; #include <queue> #include <stack> struct node{ int data; node* lchild; node* rchild; int layer; }; node* newNode(int v) { ...原创 2019-10-15 22:56:04 · 89 阅读 · 0 评论