```
class Solution {
public:
int findTilt(TreeNode* root) {
return root?abs(sum(root->left)-sum(root->right))+findTilt(root->left)+findTilt(root->right):0;
}
int sum(TreeNode* root) {
return root?root->val+sum(root->left)+sum(root->right):0;
}
};
```