re: Daily Challenge #110 - Love VS. Friendship VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Why the compactMap, you are mapping each letter to itself, works fine without that too. Also when I tried your solution with the input string "lov...
 

Oh nice! That's better !

I forgot String are a table of Character so you right compactMap is useless.
I have totally ignored emojis because the challenger treat only letter a to z

So thank you for your feedback, your optimisation is truly better 👌

I have totally ignored emojis because the challenger treat only letter a to z

True, but you did add some code to deal with the case were a character may not have an asciiValue, I just offered an alternative to that :-)

code of conduct - report abuse