?? 算法 6.4.txt
字號:
算法 6.4
void BiTreeDepth(BiTree T, int h, int &depth){
// h為T指向的結點所在層次,T指向二叉樹的根,則h的初值為1,
// depth為當前求得的最大層次,其初值為0
if (T){
if (h>depth) depth=h;
BiTreeDepth(T->lchild, h+1, depth);
BiTreeDepth(T->rchild, h+1, depth);
}
}//BiTreeDepth
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -