aboutsummaryrefslogtreecommitdiffstats
path: root/leetcode/2236/main.c
blob: b9c67c720c6e5eb9d171dc3ba0e657aad0b7e072 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     struct TreeNode *left;
 *     struct TreeNode *right;
 * };
 */
bool checkTree(struct TreeNode *root) {
  return root->left->val + root->right->val == root->val;
}