public static int[] merge(int[] first, int[] second)  {
        int[] result = new int[first.length + second.length];
        int firstIndex = 0;
        int secondIndex = 0;


        //шикарно заимплементил почти сам
        while (firstIndex + secondIndex != result.length) {
            if (firstIndex < first.length && secondIndex < second.length) {
                if (first[firstIndex] < second[secondIndex]) {
                    result[firstIndex + secondIndex] = first[firstIndex++];
                }
                else {
                    result[firstIndex + secondIndex] = second[secondIndex++];
                }
            }

            else if (secondIndex >= second.length) {
                //result[firstIndex+secondIndex] = first[firstIndex++];
                System.arraycopy(first, firstIndex, result, firstIndex+secondIndex, first.length - firstIndex); //NOT BAD
                break;
            }

            else if (firstIndex >= first.length) {
               // result[firstIndex+secondIndex] = second[secondIndex++];
                System.arraycopy(second, secondIndex, result, firstIndex+secondIndex, second.length - secondIndex);     //NOT BAD!!!!
                break;
            }


        }


        return result;
    }