二叉树——高度

来源:互联网 发布:nginx 文件服务器 编辑:程序博客网 时间:2024/05/23 17:30
int getHeigh(BitTree b) {    if (b == nullptr)        return 0;    else {        int left = getHeigh(b->left);        int right = getHeigh(b->right);        return 1 +((left > right) ? left : right);    }}
原创粉丝点击