int recursion(struct TreeNode* root,int* sum){ if(!root) return 0; int left=recursion(root->left,sum); int right=recursion(root->right,sum); (*sum) += abs(left-right); return left+right+root->val; } int findTilt(struct TreeNode* root){ int sum=0; recursion(root,&sum); return sum; }