If element of array a is smaller than that of array b , swap them .
i = 0 NEW_LINE j = n - 1 NEW_LINE while i < k : NEW_LINE INDENT if ( a [ i ] < b [ j ] ) : NEW_LINE INDENT a [ i ] , b [ j ] = b [ j ] , a [ i ] NEW_LINE DEDENT else : NEW_LINE INDENT break NEW_LINE DEDENT i += 1 NEW_LINE j -= 1 NEW_LINE DEDENT