<garvit244>226_1.py
def invertTree( root):
    if not root:
        return None
    
    queue = [root]
    while queue:
        node = queue.pop(0)
        node.left, node.right = node.right, node.left
        if node.left:
            queue.append(node.left)
        if node.right:
            queue.append(node.right)
    
    return root
def sample_funcname ( var_0 ) :
    if not var_0 :
        return None
    var_2 = [ var_0 ]
    while var_2 :
        var_5 = var_2.pop ( 0 )
        var_5.left , var_5.right = var_5.right , var_5.left
        if var_5.left :
            var_2.append ( var_5.left )
        if var_5.right :
            var_2.append ( var_5.right )
    return var_0
