Данный отчёт сгенерирован 04.04.2023 06:21:13 UTC.
HTML версия (этот сайт) сгенерирован 04.04.2023 06:21:31 UTC.
Коммит: [bfeb65b9] add automatic zip creation
04.04.2023 06:21:13
Задача: Злиття Масивів 04.04.2023 06:21:13
Описание: Оголосити метод Merge(), який отримує два цілих масива однакової довжини і повертає новий масив, побудований шляхом злиття двох перших. У новому масиві елементи першого масиву стоять на парних позиціях, елементи другого масиву стоять на непарних позиціях. Наприклад, {1, 3, 4}, {12, 13, 25} -> {1, 12, 3, 13, 4, 25}. 04.04.2023 06:21:13
Решений: 74 04.04.2023 06:21:13
Злиття Масивів 04.04.2023 06:21:13
 static int[] Merge(int[] n, int[] m){
   int[] merged = new int[n.Length + m.Length];
    for(int i = 0, nn = 0, mm = 0; i < n.Length + m.Length; i++){
        if(i % 2 == 0){
            merged[i] = m[mm];
            mm++;
        }else {
            merged[i] = n[nn];
            nn++;
        }
    }
    return merged;
}
 static int[] Merge(int[] m1, int[] m2)
{
    int[] mergedArr = new int[m1.Length + m2.Length];

    for (int i = 0; i < m1.Length; i++)
    {
        mergedArr[i * 2] = m1[i];
    }

    for (int i = 0; i < m2.Length; i++)
    {
        mergedArr[i * 2 + 1] = m2[i];
    }

    return mergedArr;
}
 static int[] Merge(int[] a, int[] b)
{
    int[] result = new int[a.Length + b.Length];
    int index = 0;

    for (int i = 0; i < a.Length; i++)
    {
        result[index] = a[i];
        index += 2;
    }

    index = 1;

    for (int i = 0; i < b.Length; i++)
    {
        result[index] = b[i];
        index += 2;
    }

    return result;
}
 static int[] Merge(int[] a, int[] b) {
    int[] newArr = new int[a.Length*2];
    
    for (int i = 0, j = 1; j < newArr.Length; i+=2, j+=2) {
        newArr[i] = a[i/2];
        newArr[j] = b[i/2];
    }
    return newArr;
}
 static int[] Merge(int[] m, int[] n)
{
    int[] newArr = new int[m.Length + n.Length];
    
    for (int i = 0; i < m.Length; i++)
    {
        newArr[i * 2] = m[i];
        newArr[i * 2 + 1] = n[i];
    }
    
    return newArr;
}
 static int[] Merge(int[] x, int[] y){
int[] res = new int[x.Length + y.Length];

for(int i = 0; i < res.Length; i++){
if(i % 2 == 0){
res[i] = x[i / 2];
}
else{
res[i] = y[i / 2];
}
}

return res;
}
 static int[] Merge(int[] arr1, int[] arr2)
{
    int[] res = new int[arr1.Length + arr2.Length];
    for (int i = 0, j = 0; i < res.Length && j < arr2.Length; i++, j++)
    {
        res[i] = arr1[j]; i++;
        res[i] = arr2[j];
    }
    return res;
}
 static int[] Merge(int[] m,int[]c){
    int[]newArray;
    int count = 0;
    int count1 = 0;
    newArray = new int[m.Length*2];
    for(int i = 0;i< newArray.Length;i++){
        if(i % 2!= 0){
            newArray[i] = m[count];
            count++;
        }
        else{
            newArray[i] = c[count1];
            count1++;
        }
    }
    return newArray;
}
 static int[] Merge(int[] a,int[] b)
{
    var list = new List< int>(a);
    list.AddRange(b);
    return list.ToArray();
}
 static int[] Merge(int[] m, int[] n)
      {
        int[] x = new int[m.Length * 2];
        for (int i = 0; i < m.Length-1; i++)
        if (i % 2 == 0)
        {
            x[i] = m[i];
        }
        else
        {
            x[i] = n[i]; 
        } 
        return x;
      }
 public static int[] Merge(int[] arr1, int[] arr2) {
    int[] result = new int[arr1.Length + arr2.Length];
    int i = 0;
    for (int j = 0; j < arr1.Length; j++) {
        result[i] = arr1[j];
        i += 2;
    }
    i = 1;
    for (int j = 0; j < arr2.Length; j++) {
        result[i] = arr2[j];
        i += 2;
    }
    return result;
}
 static int[] Merge(int[] ar1, int[] ar2){
      int[] res = new int[ar1.Length * 2 - 1];
      for(int i = 0, j = 1, k = 0; j < res.Length; i += 2, j += 2, k++){
            res[i] = ar1[k];
            res[j] = ar2[k];
      }
      return res;
}
 static int[] Merge(int[] m1, int[] m2)
{
    int[] m3 = new int[m1.Length + m2.Length];
    for(int i = 0, j = 0; j < m3.Length;j++)
    {
        if(j % 2 == 0){
            m3[j] = m1[i];
        }
        else
        {
            m3[j] = m2[i];
            i++;
        }
    }
    return m3;
}
 static int[] Merge(int[] first, int[] second){
    int[] merger = new int[first.Length + second.Length];
    for(int i = 0, j = 0; i< first.Length; i++,j+=2)
        merger[j] += first[i];
    
    for(int i = 0, j = 1;i < second.Length; i++, j+=2)
        merger[j] = second[i];
    
    return merger; 
}
 static int[] Merge(int[] a, int[] b)
      {
          int[] c = new int [a.Length+b.Length];
          for(int i=0,j=0;i+j< c.Length;)
          {
              if(i<=j)
              {
                  c[i+j]=a[i];
                  i++;
              }
              else
              {
                  c[i+j]=b[j];
                  j++;
              }
          }
          return c;
      }
 static int[] Merge( int[] m, int[]n){
    int[] arrey = new int[m.Length + n.Length];
    int k = 0, l = 1;
    foreach ( int i in m){
        arrey[k] = i;
        k += 2;
    }
    foreach ( int j in n ){
        arrey[l] = j;
        l += 2;
    }
    return arrey;
}
 static int[] Merge(int[] arr1, int[] arr2)
{
    int[] arr3 = new int[arr1.Length + arr2.Length];
    
    for (int i = 0, j = 0; i < arr3.Length && j < arr1.Length; i += 2, j++)
    {
        arr3[i] = arr1[j];
        arr3[i + 1] = arr2[j];
    }
    return arr3;
}
 static int[] Merge(int[] m, int[] k){
    int[] res=new int[m.Length+k.Length];
    for(int i=0,j=0;j< res.Length;i++,j+=2){
        res[j]=m[i];
    }
    for(int i=0,j=1;j< res.Length;i++,j+=2){
        res[j]=k[i];
    }
    return res;
}
 public static int[] Merge(int[] arr1, int[] arr2)
{
    int[] result = new int[arr1.Length + arr2.Length];

    for (int i = 0, j = 0; i < arr1.Length; i++, j += 2)
    {
        result[j] = arr1[i];
    }

    for (int i = 0, j = 1; i < arr2.Length; i++, j += 2)
    {
        result[j] = arr2[i];
    }

    return result;
}
 static int[] Merge(int[] m1, int[] m2){
    int[] res=new int[m1.Length*2];
    for (int i=0; i< m1.Length; i++){
        res[i*2]=m1[i];
        res[i*2+1]=m2[i];
    }
    return res;
}
 static int[] Merge(int[] m,int[] n)
        {
            int[] result = new int[m.Length + n.Length];
            int j = 0;
            for (int i = 0; i < m.Length; i++)
            {
                result[j++] = m[i];
                result[j++] = n[i];
            }
            return result;
        }
 static int[] Merge(int[] array1,int[] array2){
          int[] result1 = array1.Concat(array2).ToArray();
          return result1;
      }
 static int[] Merge(int[]a, int[] b){
                int[] result = new int[a.Length+b.Length];
                int scheta = 0, schetb = 1;
            result[0] = a[0];
            result[1]= b[0];

               for(int i = 2; i < result.Length; i++)
                    {

                if (i % 2 == 0)
                {
                    scheta++;
                    result[i] = a[i - scheta];
                }
                else
                {
                    schetb++;
                    result[i] = b[i-schetb];
                }
            }
                return result;
            }
 static int[] Merge(int[] a, int[] b)
{
    int[] array = new int[a.Length + b.Length];
    for (int i = 0, j = 0; i < array.Length; i++)
    {
        if (i % 2 == 0){
            array[i] = a[j];    
        } else {
            array[i] = b[j];
            j++;
        }
    }
    return array;
}
 public static int[] Merge(int[] arr1, int[] arr2)
{
    return Enumerable.Range(0, arr1.Length * 2)
        .Select(i => i % 2 == 0 ? arr1[i / 2] : arr2[i / 2])
        .ToArray();
}
 static int[] Merge(int[] m, int[] k)
        {
            int[] t = new int[m.Length];
            for (int i = 0; i < m.Length; i++)
            {
                if (i % 2 == 0)
                {
                    t[i] = m[i];
                } else if(i % 2 !=0)
                {
                    t[i] = k[i];
                }
            }
            return t;
    }
 static int[] Merge(int[] arr1, int[] arr2) 
{
    int[] arrMerge = new int[arr1.Length * 2];
    
    for (int i = 0, j = 0, f = 0; i < arr1.Length * 2; i++)
    {
        if (i % 2 == 0) 
        {
            arrMerge[i] = arr1[j];
            j++;
        }
        else 
        {
            arrMerge[i] = arr2[f];
            f++;
        }
    }
    
    return arrMerge;
}
 static int[] Merge(int[] arr1, int[] arr2) {
  int[] arr = new int[arr1.Length + arr2.Length];
      for(int i = 0; i < arr1.Length; i++){
          arr[i] = (i%2 == 0) ? arr1[i] : arr2[i];
      }
      return arr;
  }
 static int[] Merge(int[] arr1, int[] arr2){
        int[] newArr = new int[arr1.Length + arr2.Length];
        for (int i = 0; i < newArr.Length; i += 1) {
            foreach (int a in arr1) {
                foreach (int b in arr2){
                    if (i % 2 == 0)
                      newArr[i] = a;
                    else 
                      newArr[i] = b;
                }
            }
        }
        return newArr;
    }
 static int[] Merge(int[] a, int[] b)
{
    int[] c = new int[a.Length+b.Length];
    for(int i = 0; i< a.Length-1; i+=2)
    {
        c[i] = a[i];
        c[i+1] = b[i];
    }
    return c;
}
 static int [] Merge(int [] m, int [] n){
    int [] newArr = new int[2*m.Length];
        for (int i = 0, j = 0; j < newArr.Length; i++, j += 2){
            newArr[j] = m[i];
            newArr[j + 1] = n[i]; 
        }
        return newArr;
}
 static int[] Merge(int[] m, int[] n){
    int[] result = new int[m.Length + n.Length];
    int index1 = 0;
    int index2 = 0;

    for (int i = 0; i < result.Length; i++)
    {
        if (i % 2 == 0)
        {
            result[i] = m[index1];
            index1++;
        }
        else
        {
            result[i] = n[index2];
            index2++;
        }
    }
    return result;
}
 public static int[] Merge(int[] a, int[] b)
        {
            List< int> res = new List< int>();
            int cnt = 0;
           foreach(int i in a)
            {
                res.Add(i);
                res.Add(b[cnt]);
                cnt++;
            }

            return res.ToArray();
        
    }
 static int [] Merge(int[] m, int[]n){

    int[] Massiv = new int[1];
    return Massiv;
}
 static int[] Merge(int[] a, int[] b) {
    return a.Concat(b).ToArray();
}
 static int[] Merge(int[] a,int[] b){
        int[] arr2 = new int[a.Length + b.Length];
        for(int i = 0; i < a.Length; i++)
        {
            arr2[i] = a[i];
        }
        for(int j = 0; j < b.Length; j++)
        {
            arr2[j + a.Length] = b[j];
        }
        return arr2;
}
 static int[] Merge(int[] a, int[] b) {
    int[] arr = new int[a.Length + b.Length];
    int n = 0;
    for (int i = 0; i < a.Length; i++) {
        arr[n] = a[i];
        n++;
        arr[n] = b[i];
        n++;
    }

    return arr;
}
 static int[] Merge(int[] arr1, int[] arr2)
{
    int[] result = new int[arr1.Length + arr2.Length];
    for(int i = 0; i < arr1.Length; i++) 
        result[i] = arr1[i];
    for(int i = 0; i < arr2.Length; i++) 
        result[arr1.Length + i] = arr2[i];
    return result;
}
static int[] Merge(int[] arr1, int[] arr2) {
    int[] result = new int[arr1.Length*2];
    
    result[0] = arr1[0];
    result[1] = arr2[0];
    
    for(int i = 1; i < arr1.Length; i++) {
        result[i*2] = arr1[i];
        result[i*2+1] = arr2[i];
    }
    
    return result;
}
 static int[] Merge(int[] arr1, int[] arr2)
{
    int[] result = new int[arr1.Length + arr2.Length];
    result = arr1.Concat(arr2).ToArray();
    return result;
}
 static int[] Merge(int[] m1, int[] m2) {
    int[] array = new int[m1.Length + m2.Length];
    int i = 0;
    int j = 1;
    int k = 0;
    while (i <= array.Length - 1 && j <= array.Length) {
        array[i] = m1[k];
        array[j] = m2[k];
        i += 2;
        j += 2;
        k++;
    }
    return array;
}
 static int[] Merge(int[] first, int[] second){
      int[] merger = new int[first.Length + second.Length];
      for(int i = 0, j = 0; i< first.Length; i++,j+=2){
        merger[j] += first[i];
      }
      for(int i = 0, j = 1;i < second.Length; i++, j+=2){
        merger[j] = second[i];
      }
      return merger; 
    }
 static int[] Merge(int[] n, int[] z)
        {
            int[] pop = new int[(n.Length * 2) - 1];
            for (int i = 0, k = 0; i < pop.Length; i = i + 2, k++)
            {
                pop[i] = n[k];
            }
            for (int i = 1, k = 0; i < pop.Length; i = i + 2, k++)
            {
                pop[i] = z[k];
            }
            return pop;
        }
 static int[] Merge(int[] arr1, int[] arr2)
{
    int[] res = new int[arr1.Length*2];
    for (int ind = 0,n = 0; n < arr1.Length; ind += 2, n++)
    {
        res[ind] = arr1[n];
        res[ind + 1] = arr2[n];
    }
    return res;
}
 static int[] Merge(int[]a, int[]b)
{
    int[] arr = new int[a.Length*2];
    for(int i=0; i<=arr.Length-1; i++)
    {
        if(i%2==0)
        {
            arr[i] = a[i/2];
        }
        if(i%2==1 && (i/2+1) < b.Length)
        {
            arr[i] = b[i/2+1];
        }
    }
    return arr;
}
 static int[] Merge( int[] a, int[]b){ 
    int[] c = new int[a.Length + b.Length]; 
    int k = 0, l = 1; 
    foreach ( int i in a){ 
        c[k] = i; 
        k += 2; 
    } 
    foreach ( int j in b ){ 
        c[l] = j; 
        l += 2; 
    } 
    return c; 
}
 static int[] Merge(int[] m, int[] n) {
    int[] x = new int[m.Length * 2];
    
    for (int i = 0; i < m.Length; i++) {
        x[i] = m[i];
        x[i + 1] = n[i];
    }
    
    return x;
}
 static int[] Merge(int[] arr1, int[] arr2)
{
    var newArr = new int[2*arr1.Length];
    int k = 0, j = 0;
    for(int i = 0; i < newArr.Length; i++)
    {
        if(i%2 == 0)
        {
            newArr[i] = arr1[k];
            k++;
        }
        else
        {
            newArr[i] = arr2[j];
            j++;
        }
    }
    return newArr;
}
 static int[] Merge(int[] m1, int[] m2){
    int[] answ = new int[m1.Length*2];
    int c = 0;
    
    for(int i = 0; i < answ.Length; i+=2){
        answ[i] = m1[c];
        answ[i+1] = m2[c];
        c++;
    }
    return answ;
}
 static int[] Merge(int[] m, int[] n){
    int[] arr = new int[m.Length+n.Length];
        for(int i = 0, j = 0; i< m.Length; i++){
           for(int s = 0; s < arr.Length; s++) {
              if (s%2 == 0){
                  arr[s] = m[i];
              }
              else{
                  arr[s] = n[j];
              }
           }
        }
    return arr;
}
 static int[] Merge(int[] a, int[] b) {
    int[] merged = new int[a.Length + b.Length];
    for (int i = 0; i < a.Length; i++) merged[i] = a[i];
    for (int i = 0; i < a.Length; i++) merged[a.Length + i] = b[i];
    return merged;
}
 static int[] Merge(int[] m, int[] n)
{
     int[] k= new int[2*m.Length];
     for(int i=0; i< m.Length; i++){
         if(i%2==0)
         k[2*i]=m[i];
         else
         k[2*i+1]=n[i];
     }
     return k;
}
 static int[] Merge(int[] firstIar, int[] secondIarr)
{
    int[] arr = new int[firstIar.Length+secondIarr.Length];
    for(int i = 0, k = 0; i < firstIar.Length; i++, k++)
    {
        arr[k] = firstIar[i];
        k++;
        arr[k] = secondIarr[i];
    }
    return arr;
}
 static int[] Merge(int[] a, int[] b)
{
    int[] m = new int[a.Length + b.Length];
    for (int i = 0; i < a.Length; i++) {

        m[2 * i] = a[i];
        m[2 * i + 1] = b[i];
    }
    return m;
}
 static int[] Merge(int[] a, int[] b)
{
    int[] arr = new int[2 * a.Length];
    
    for (int i = 0; i < arr.Length;)
    {
        for(int j = 0; j < a.Length; j++)
        {
            arr[i] = a[j];
            arr[i + 1] = b[j];
            i += 2;
        }
    }
    return arr;
}
 static int[] Merge(int[] m, int[] p){
    int[] result = new int[m.Length + p.Length];
    for(int i = 0,j=0,k=0;i < result.Length;i++){
        if(i%2 == 0){
            result[i] = m[j];
            j++;
        }
        else{
            result[i] = p[k];
            k++;
        }
    }
    return result;
}
 static int[] Merge(int[] a, int[] b)
    {
        int n = a.Length;
        int[] result = new int[2 * n];

        for (int i = 0; i < n; i++)
        {
            result[2 * i] = a[i];
            result[2 * i + 1] = b[i];
        }

        return result;
    }
 static int[] Merge(int[] x, int[] y)
{
    int[] result = new int[6];
    int j = 0;
    int n = 0;
    for (int i = 0; i < x.Length + y.Length; i++)
    {

        if (i % 2 == 0)
        {
            result[i] = x[j];
            j++;
        }
        else
        {
            result[i] = y[n];
            n++;
        }

    }
    return result;
}
// int[] r = { 1, 3, 4 };
// int[] t = { 12, 13, 25 };
// foreach (int n in Merge(r, t))
// {
//     Console.Write(n + " ");
// }
 static int[] Merge(int[] m, int[] n){
    int[] array = new int[m.Length + n.Length];
    int s = 0, l = 1;
    for(int i = 0; i < m.Length; i++){
        array[s] = m[i];
        s += 2;
    }
    for(int j = 0; j < n.Length; j++){
        array[l] = n[j];
        l += 2;
    }
    return array;
}
 static int[] Merge(int[] arr1, int[] arr2)
        {
            int [] newArr = new int[arr1.Length + arr2.Length];
            int arr1Index = 0;
            int arr2Index = 0;
            for (int i = 0; i < newArr.Length; i++)
            {
                if(i % 2 == 0)
                    newArr[i] = arr1[arr1Index++];
                else
                    newArr[i] = arr2[arr2Index++];
            }
            return newArr;
        }
 static int[] Merge(int[] arr1, int[] arr2){
    int[] res = new int[arr1.Length*2];
    for (int i=0; i< arr1.Length; i++){
        res[i]=arr1[i];
        res[arr1.Length+i-1]=arr2[i];
    }
    return res;
}
 static int[] Merge(int[] a, int[] b) {
    /*
    
    ░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄
░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄
░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█
░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░█
░▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░█
█▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒█
█▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█
░█▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█
░░█░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█
░░░█░░██░░▀█▄▄▄█▄▄█▄████░█
░░░░█░░░▀▀▄░█░░░█░███████░█
░░░░░▀▄░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█
░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░█
░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░█
░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░█
    */
    int[] merged = new int[a.Length + b.Length];
    for (int i = 0; i < a.Length; i++) merged[i] = a[i];
    for (int i = 0; i < b.Length; i++) merged[a.Length + i] = b[i];
    return merged;
}
 static int[] Merge(int[] Farr, int[] Sarr)
      {
          int[] newarr = new int[Farr.Length+Sarr.Length];
          int first = 0;
          int second = 0;
          for(int i = 0;i< newarr.Length;i++)
          {
              if((i+1)%2==0)
              {
                  newarr[i] = Farr[first];
                  first++;
              }
              else
              {
                  newarr[i] = Sarr[second];
                  second++;
              }
             
          }
          return newarr;
      }
 static int[] Merge(int[] arr1, int[] arr2){
    int[] res = new int[arr1.Length*2];
    for (int i=0; i< arr1.Length; i++){
        res[i]=arr1[i];
        res[arr1.Length+i-1]=arr2[i];
    }
    return res;
}
 static int[] Merge(int[] arr1, int[] arr2)
        {
            int[] arr = new int[arr1.Length + arr2.Length];
            int j = 0;
            for (int i = 0; i < arr1.Length; i++)
            {
                arr[j] = arr1[i];
                j += 2;
                arr[j - 1] = arr2[i];
            }
            return arr;
        }
 static int[] Merge(int[] even, int[] odd)
{
    int[] merged = new int[even.Length + odd.Length];
    for(int i= 0; i< even.Length; i++)
    {
        merged[i * 2] = even[i];
        merged[i * 2 + 1] = odd[i];
    }
    return merged;
}
 static int[] Merge(int[] even, int[] odd)
{
    int[] res = new int[even.Length * 2];
    for (int i = 0; i < even.Length; i++)
    {
        res[2 * i] = even[i];
        res[2 * i + 1] = odd[i];
    }
    return res;
}
 static int[] Merge(int[] m, int[] n)
{
    int[] p = new int[m.Length*2];
    for(int i = 0, j = 0, k = 0; k < m.Length*2; k++)
    {
        if(k % 2 == 0)
        {
            p[k] = m[i];
            i++;
        }
        else
        {
            p[k] = n[j];
            j++;
        }
    }
    return p;
}
 static int[] Merge(int [] m1, int[] m2){
    int[] arr = new int[m1.Length + m2.Length];
    for (int i = 0, j = 0; i < arr.Length; i+=2, j++){
        arr[i]=m1[j];
        arr[i+1]=m2[j];
    }
    return arr;
}
 static int[] Merge(int[]hell, int[]heaven){
    int[] earth = new int[hell.Length*2];
    for(int j = 0; j < hell.Length; j++){
    for(int i = 0; i < earth.Length ;i++){
        if (i%2==0){
            earth[i]=hell[j];
        }
        else{
            earth[i]=heaven[j];
        }
    }}
    return earth;
}
 static int[] Merge(int[] arr1, int[] arr2) {
    int[] res = new int[arr1.Length * 2];
    for (int i = 0; i < arr1.Length; i++) {
        res[i * 2] = arr1[i];
        res[i * 2 + 1] = arr2[i];
    }
    return res;
}
 public static int[] Merge(int[] arr1, int[] arr2){
    int[] result = new int[arr1.Length * 2];
    for(int i = 0; i< arr1.Length; i++){
        result[i*2]=arr1[i];
        result[i*2+1]=arr2[i];
    }
    return result;
}
 static int[] Merge(int[] m1, int[] m2){
    int[] result = new int[m1.Length + m2.Length];
    for (int i = 0, j = 0; i < result.Length; i+=2,j++)
    {
        result[i] = m1[j];
        result[i+1] = m2[j];    
    }
    return result;
}
 static int[] Merge(int[] m1, int[] m2)
{
   int[] set = new int[m1.Length * 2];

    for (int i = 0; i < set.Length; ++i)
    {
        if (i % 2 == 0)
            set[i] = m1[i/2];
        else
            set[i] = m2[i/2];
    }
        
    return set;
}