int countNodes(struct TreeNode* root){ return (root)?countNodes(root->left)+countNodes(root->right)+1 :0; }
【leetcode】222. 完全二叉树的节点个数
原文:https://www.cnblogs.com/ganxiang/p/14202520.html