Misma cantidad de elementos únicos
Escribe una función que devuelva true si dos arreglos tienen la misma cantidad de elementos únicos y false en caso contrario.
Para ilustrarlo:
int[] first = { 1, 3, 4, 4, 4 };
int[] second = { 2, 5, 7 };En first, el número 4 aparece tres veces, pero el arreglo contiene tres elementos únicos: { 1, 3, 4 }. Como first y second contienen la misma cantidad de elementos únicos, este ejemplo devuelve true.
Ejemplos
Program.Same(new[] { 1, 3, 4, 4, 4 }, new[] { 2, 5, 7 }) ➞ true
Program.Same(new[] { 9, 8, 7, 6 }, new[] { 4, 4, 3, 1 }) ➞ false
Program.Same(new[] { 2 }, new[] { 3, 3, 3, 3, 3 }) ➞ trueNotas
N/A