De números para objetos

Para cada código ASCII de uma letra minúscula, crie um dicionário com uma única entrada. Use como chave o código decimal convertido em uma string e, como valor, uma string de um caractere que contenha a letra minúscula representada. Retorne todas as coleções de uma única entrada na ordem original, incluindo os códigos duplicados.

Crie Program.NumObj(int[]).

Exemplos

Program.NumObj(new[] { 118, 117, 120 }) ➞ new[] { new Dictionary<string, string> { { "118", "v" } }, new Dictionary<string, string> { { "117", "u" } }, new Dictionary<string, string> { { "120", "x" } } }

Program.NumObj(new[] { 101, 121, 110, 113, 103 }) ➞ new[] { new Dictionary<string, string> { { "101", "e" } }, new Dictionary<string, string> { { "121", "y" } }, new Dictionary<string, string> { { "110", "n" } }, new Dictionary<string, string> { { "113", "q" } }, new Dictionary<string, string> { { "103", "g" } } }

Program.NumObj(new[] { 118, 103, 110 }) ➞ new[] { new Dictionary<string, string> { { "118", "v" } }, new Dictionary<string, string> { { "103", "g" } }, new Dictionary<string, string> { { "110", "n" } } }

Notas

  • A entrada é um array de números.
  • Cada código representa uma letra ASCII minúscula válida.
  • O array de entrada não está vazio.