[Lecture 47] What does LetterSeen[Letter] mean? (solved IsIsogram() using .find)

Hey everyone,

I solved the challenge using the .find and .insert method. After searching online, .find seemed to be the most common way for searching a map, and .insert the way to insert a new pair of key and value into it.
I have seen the solution and couldn’t quite understand what was being done there.
What does LetterSeen[Letter] mean? Is it a different way of expressing “is in”?

My solution:

Thank you,
Omga4000 :slight_smile:

find returns an iterator so I think that would be overkill.
an iterator can be incremented, etc.
Letterseen[Letter] holds a bool in that location just like an array would except we are not using numbers.
it maps a bool to a letter. see also hash.

Privacy & Terms