222---完全二叉树结点的个数 难度:中等2024-03-13 18:27:09 class Solution { public: int countNodes(TreeNode* root) { if(root==NULL) return 0; return countNodes(root->left)+countNodes(root->right)+1; } }; 点赞 收藏 分享 文章举报 不停--- 发布了258 篇原创文章 · 获赞 16 · 访问量 1万+ 私信 关注 上一篇:原生js-----------addEventListener添加事件和直接添加事件区别下一篇:暑假学习2