int LeavesNodeNum(Node *pRoot) { if (!pRoot) return 0; if (!pRoot->pLeft && !pRoot->pRight) return 1; return LeavesNodeNum(pRoot->pLeft) + LeavesNodeNum(pRoot->pRight); }
EOF
int LeavesNodeNum(Node *pRoot) { if (!pRoot) return 0; if (!pRoot->pLeft && !pRoot->pRight) return 1; return LeavesNodeNum(pRoot->pLeft) + LeavesNodeNum(pRoot->pRight); }
EOF
转载于:https://www.cnblogs.com/lihaozy/archive/2012/12/07/2807490.html