```
def findTilt(self, root):
tot=[]
def inTrav(node):
if node is None: return 0
x,y=inTrav(node.left),inTrav(node.right)
tot.append(abs(x-y))
return x+y+node.val
if root is None: return 0
tot.append(abs(inTrav(root.left)-inTrav(root.right)))
return sum(tot)
```