Preorder: A B D F E C G H I Postorder: D E F B H G I C A Levelorder: A B C D F G I E H 函数实现细节: 1#defineMAXSIZE 202voidInorderTraversal( BinTree BT ){3if(BT!=NULL){4BinTree stack[30];5inttop=-1;6while(BT||top!=-1){7while(BT){8stack[++top]=BT;9BT...
6.8 二叉树高度int GetHeight(BinTree BT) { if (BT == NULL) return 0; int leftH = GetHeight(BT->Left); int rightH = GetHeight(BT->Right); if (leftH > rightH) return leftH + 1; else return rightH + 1; } 6-9 二叉树的遍历void InorderTraversal(BinTree BT) { if (BT == ...