6-8 求二叉树高度(20 分)

int GetHeight( BinTree BT )
{
  if(BT) 
  {
      if( GetHeight(BT->Left) > GetHeight(BT->Right) )   
      return (1+GetHeight(BT->Left));
      else return (1+GetHeight(BT->Right));
  }
  else return 0;
}

猜你喜欢

转载自blog.csdn.net/yubai258/article/details/81294078