Merge two sorted arrays in single sorted array
i = 0 NEW_LINE j = half_i NEW_LINE k = 0 NEW_LINE while ( i < half_i and j < n ) : NEW_LINE INDENT if ( A [ i ] < A [ j ] ) : NEW_LINE INDENT temp [ k ] = A [ i ] NEW_LINE k += 1 NEW_LINE i += 1 NEW_LINE DEDENT else : NEW_LINE INDENT temp [ k ] = A [ j ] NEW_LINE k += 1 NEW_LINE j += 1 NEW_LINE DEDENT DEDENT