Skip to content

Instantly share code, notes, and snippets.

@meidav
Created February 3, 2019 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meidav/de3d3d7d722df2ccae39f9eab281ccfa to your computer and use it in GitHub Desktop.
Save meidav/de3d3d7d722df2ccae39f9eab281ccfa to your computer and use it in GitHub Desktop.
FBullCowGame::IsIsogram
bool FBullCowGame::IsIsogram(FString Word) const
{
if (Word.length() <= 1) { return true; }
TMap<char, bool> LetterSeen;
for (auto Letter : Word) {
Letter = tolower(Letter);
if (LetterSeen[Letter]) {
return false;
} else {
LetterSeen[Letter] = true;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment