[PTA] 数据结构与算法题目集 6-11 先序输出叶结点
//函数PreorderPrintLeaves应按照先序遍历的顺序输出给定二叉树BT的叶结点,格式为一个空格跟着一个字符。 void PreorderPrintLeaves(BinTree BT) { if (BT == NULL) return; if (BT->Left == NULL && BT->Right == NULL) printf(" %c", BT->Data); PreorderPrintLeaves(BT->Left); PreorderPrintLeaves(BT->Right); }