Encontre o primeiro caractere que não se repete
Crie uma função que aceite uma string como argumento e retorne o primeiro caractere que não se repete.
Exemplos
firstNonRepeatedCharacter("g") ➞ "g"
firstNonRepeatedCharacter("it was then the frothy word met the round night") ➞ "a"
firstNonRepeatedCharacter("the quick brown fox jumps then quickly blows air") ➞ "f"
firstNonRepeatedCharacter("hheelloo") ➞ "Invalid"
firstNonRepeatedCharacter("") ➞ "Invalid"Observações
- Uma string vazia deve retornar
"Invalid". - Se todos os caracteres se repetirem, retorne
"Invalid". - Não se preocupe com diferenciação entre maiúsculas e minúsculas nem com caracteres não alfanuméricos.