package suanfa;
public class heighttree {
public int heightoftree(Node node){
int height=0;
if (node==null){
return 0;
}
else{
return max(heightoftree(node.getLchild()),heightoftree(node.getRchild()))+1;
}
}
public int max(int a ,int b){
int c=a>b?a:b;
return c;
}
}