IsIsogram by Grat

the “if” is not nessessary - the code falls through

bool FBullCowGame::IsIsogram(FString Word) const
{
TMap<char, bool> LetterSeen;
for (auto Letter : Word)
{
Letter = tolower(Letter);
if (LetterSeen[Letter]) return false;
LetterSeen[Letter] = true;
}
return true;
}

Privacy & Terms