筆試程序題專項----判斷二叉樹是否平衡

//判斷一個二叉樹是否是平衡二叉樹 返回值是樹的高度,單根高度爲1. int isAVL(BTree T, bool & isAV) { isAV=true; if(T==NULL) return 0; else if(T->lchild==NULL&&T->rchild==NULL) return 1; bool lAV=true; int l1=isAVL(T->lchil
相關文章
相關標籤/搜索