I was disappointed how easy today was: ``` val si...
# advent-of-code
s
I was disappointed how easy today was:
Copy code
val simple = input.map {  it.split(" ") }
            .map { it.size to it.toSet() }
            .map { it.second.size == it.first }
            .count { it }

val advanced =  input.map { it.split(" ") }
            .map { it.size to it.map { it.toCharArray().toSet() }.toSet() }
            .map { it.second.size == it.first }
            .count { it }
h
in the anagram test: how would
toSet
allow for duplicate characters in a word?
s
It wouldn’t, that is a bug that did not come up for me solution 🙂 it should be sorted list