https://leetcode.com/problems/count-complete-tree-nodes


Runtime: 24 ms, faster than 92.63% of C++ online submissions for Count Complete Tree Nodes.
Memory Usage: 30.8 MB, less than 60.65% of C++ online submissions for Count Complete Tree Nodes.


```cpp
class Solution {
public:
    int counting;
    
    void travel(TreeNode* node) {
        if (node != nullptr) {
            counting += 1;
            travel(node->left);
            travel(node->right);
        }
    }
    
    int countNodes(TreeNode* root) {
        //4:23
        counting = 0;
        travel(root);
        return counting;
        //4:23
    }
};
```