<doocs>0099.Recover Binary Search Tree_1.py
def dfs(root):
    nonlocal prev, first, second
    if root:
        dfs(root.left)
        if prev:
            if first is None and root.val < prev.val:
                first = prev
            if first and root.val < prev.val:
                second = root
        prev = root
        dfs(root.right)
def sample_funcname ( var_1 ) :
    nonlocal var_2 , var_3 , var_4
    if var_1 :
        var_0 ( var_1.left )
        if var_2 :
            if var_3 is None and var_1.val < var_2.val :
                var_3 = var_2
            if var_3 and var_1.val < var_2.val :
                var_4 = var_1
        var_2 = var_1
        var_0 ( var_1.right )
