#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
const int maxn = 10000;
struct tree
{
tree * l, *r;
int data;
tree()
{
l = r = NULL;
data = 0;
}
};
int layer[maxn], in[maxn];
//前序遍历
void PreOrder(tree * root)
{
if(root !
还原二叉树:层序遍历+中序遍历
最新推荐文章于 2024-05-25 17:34:27 发布