<doocs>0112.Path Sum_1.py
def dfs(root, sum):
    if root is None:
        return False
    if root.val == sum and root.left is None and root.right is None:
        return True
    return dfs(root.left, sum - root.val) or dfs(root.right, sum - root.val)
def sample_funcname ( var_1 , var_2 ) :
    if var_1 is None :
        return False
    if var_1.val == var_2 and var_1.left is None and var_1.right is None :
        return True
    return var_0 ( var_1.left , var_2 - var_1.val ) or var_0 ( var_1.right , var_2 - var_1.val )
