// This file is generated by mkfile.py
// Date: 2026-03-09

#include <solution/222.h>

#include <stddef.h>
void inorder(struct TreeNode *node, int *cnt)
{
    if (node == NULL)
        return;

    (*cnt)++;
    inorder(node->left, cnt);
    inorder(node->right, cnt);
}

int countNodes(struct TreeNode *root)
{
    int cnt = 0;
    inorder(root, &cnt);
    return cnt;
}