Simple Isogram Check - Could it be as simple as this?

Hello,

I’m wondering if the check could be as simple as this one I’ve written?

bool FBullCowGame::IsWordIsogram(FString word) const{
	for (int i = 0; i < word.length(); i++) {
		for (int j = i + 1; j < word.length(); j++) {
			if (word[i] == word[j]) {
				return false;
			}
		}
	}
	return true;
}

Cheers,
Robert

Here, you can check it’s function:

https://codepen.io/B3hindL0gic/pen/yrGrez

Yes, see here

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms