package ru.job4j.array;

        import java.util.Arrays;

public class ArrayMerger {
    public int[] mergerWithSort(int[] arrayFirst, int[] arraySecond) {
        int[] newArray = new int[arrayFirst.length + arraySecond.length];
        for (int x = 0; x < arrayFirst.length; x++) {
            newArray[x] = arrayFirst[x];
        }
        for (int x = arrayFirst.length, y = 0; x < arrayFirst.length + arraySecond.length; x++, y++) {
            newArray[x] = arraySecond[y];
        }
        Arrays.sort(newArray);
        return newArray;
    }
}

@@ -22,41 +22,8 @@
 y;%0A%0A
-        import java.util.Arrays;%0A
 %0Apub
@@ -463,30 +463,330 @@
     
-Arrays.sort(newArray);
+for (int i = newArray.length - 1; i %3E= 0; i--) %7B%0A            for (int j = 0; j %3C i; j++) %7B%0A                if (newArray%5Bj%5D %3E newArray%5Bj + 1%5D) %7B%0A                    int tmp = newArray%5Bj%5D;%0A                    newArray%5Bj%5D = newArray%5Bj + 1%5D;%0A                    newArray%5Bj + 1%5D = tmp;%0A                %7D%0A            %7D%0A        %7D
 %0A   

слияние с сортировкой