Truly magnificent! It uses exactly the same functional approach as my solution, only that yours is even more terse due to the use of nested lambdas as well as tuple assignment and map function. Especially the idea of employing map here is what I like most. My deepest respect!
My mistake
Use spoiler flag next time please, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
One tiny bit of code optimization that would still be possible here: You could leave out the tuple() constructor in the first map() call.
Truly magnificent! It uses exactly the same functional approach as my solution, only that yours is even more terse due to the use of nested lambdas as well as tuple assignment and map function. Especially the idea of employing map here is what I like most. My deepest respect!
magnificent!
That's because a string is, under the hood, an array of characters. When put into a set, it's basically how it's treated like.
Wow. I didn't realize that Set would automatically decompose the string into characters.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I wondered if someone would take this approach, it definitely seems more clever and efficient from a general purpose perspective.
This is really good.
Loading more items...