<garvit244>100_1.py
def isSameTree( p, q):
    if not p and not q:
        return True 
    
    stack = [(p, q)]
    
    while stack:
        node1, node2 = stack.pop()
        if node1 and node2 and node1.val == node2.val:
            stack.append((node1.left, node2.left))
            stack.append((node1.right, node2.right))
        else:
            if not node1 == node2:
                return False 
    
    return True
def sample_funcname ( var_0 , var_1 ) :
    if not var_0 and not var_1 :
        return True
    var_3 = [ ( var_0 , var_1 ) ]
    while var_3 :
        var_5 , var_6 = var_3.pop ( )
        if var_5 and var_6 and var_5.val == var_6.val :
            var_3.append ( ( var_5.left , var_6.left ) )
            var_3.append ( ( var_5.right , var_6.right ) )
        else :
            if not var_5 == var_6 :
                return False
    return True
