Onde está Waldo?

Retorne as coordenadas [row, column] do único elemento que é diferente de todos os outros elementos da matriz.

Exemplos

Program.WhereIsWaldo(new[] { new[] { "A", "A", "A" }, new[] { "A", "A", "A" }, new[] { "A", "B", "A" } }); // new[] { 3, 2 }

Program.WhereIsWaldo(new[] { new[] { "c", "c", "c", "c" }, new[] { "c", "c", "c", "d" } }); // new[] { 2, 4 }

Program.WhereIsWaldo(new[] { new[] { "O", "O", "O", "O" }, new[] { "O", "O", "O", "O" }, new[] { "O", "O", "O", "O" }, new[] { "O", "O", "O", "O" }, new[] { "P", "O", "O", "O" }, new[] { "O", "O", "O", "O" } }); // new[] { 5, 1 }

Notas

  • O array é sempre quadrado ou retangular.
  • As linhas e as colunas são indexadas a partir de um, não a partir de zero.