Not exactly pseudo code but here is IsIsogram() of mine

Got carried away a little when started to think how could I implement the function without loops and here what i got:

<code>
bool UBullCowCartridge::IsIsogram(FString Input)
{
    int32 InputLength = Input.Len();
    char* result = TCHAR_TO_ANSI(*Input);
    std::set<char> UniqueInputChars(result, result+InputLength);
    if (InputLength == UniqueInputChars.size())
    {
        return true;
    }
    else
    {
        return false;
    }
}

</code>
1 Like

I just see someone passionate about learning! Keep up the awesome work!

1 Like

Privacy & Terms