äºåæ éå代ç
#include"iostream.h"
#include"stdlib.h"
#include"stdio.h"
#include<stack>
using namespace std;
#define NULL 0
#define OK 1
#define OVERFLOW -1
typedef int Status;
typedef struct node
{
char data;
struct node *lchild;
struct node *rchild;
}*bitree;
int k=0;
int depth(bitree T)//æ çé«åº¦
{
if(!T)return 0;
else
{
int m=depth(T->lchild); int n=depth(T->rchild); return (m>n?m:n)+1;
}
}
//å
åºï¼ä¸åº 建æ
struct node *create(char *pre,char *ord,int n) {
struct node * T;
int m;
T=NULL;
if(n<=0)
{
return NULL;
}
else
{
温馨提示:答案为网友推荐,仅供参考