Why not call IsLowercase before IsIsogram?

It seems odd that we’re checking for an isogram first and adding a step to cast every character to lowercase before we check if the string is all lowercase. Wouldn’t it make more sense to call IsLowercase first, and then if the guess makes it through to IsIsogram we know it must be all lowercase? That saves us the step of making the characters lowercase in IsIsogram.

It also seems a little silly to enforce a policy that the input must be all lowercase when we can just cast it to lowercase easily when comparing to the hidden word

Welp, I watched the rest of the video, and it’s covered under implicit dependencies :slight_smile:

Privacy & Terms