返回叶子结点个数:int getYeatNodeNumber(TreeNode *root){ if (root == NULL) return 0; if (root->left == NULL && root->right == NULL) return 1; return getYeatNodeNumber(root->left) + getYeatNodeNumber(root->right);}