Insertar un arreglo en otro
Crea una función que reciba dos arreglos e inserte el segundo entre los dos elementos del primero.
Ejemplos
Program.TuckIn(new int[] { 1, 10 }, new int[] { 2, 3, 4, 5, 6, 7, 8, 9 }) ➞ new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }
Program.TuckIn(new int[] { 15, 150 }, new int[] { 45, 75, 35 }) ➞ new int[] { 15, 45, 75, 35, 150 }
Program.TuckIn(new int[][] { new int[] { 1, 2 }, new int[] { 5, 6 } }, new int[][] { new int[] { 3, 4 } }) ➞ new int[][] { new int[] { 1, 2 }, new int[] { 3, 4 }, new int[] { 5, 6 } }
Program.TuckIn(new[] { "bottom", "topping" }, new[] { "tomato sauce", "vegetables", "cheese" }) ➞ new[] { "bottom", "tomato sauce", "vegetables", "cheese", "topping" }Notas
El primer arreglo siempre tiene dos elementos.