':type root: TreeNode
:rtype: int'

def findTilt(self, root):

    def postOrderTraverse(root, tilt):
        if (not root):
            return (0, tilt)
        (left, tilt) = postOrderTraverse(root.left, tilt)
        (right, tilt) = postOrderTraverse(root.right, tilt)
        tilt += abs((left - right))
        return (((left + right) + root.val), tilt)
    return postOrderTraverse(root, 0)[1]
