4 ms·
I love that this code is so elegant, but (and!) chooses strings and string manipulation for storage of the possible cell values. It seems like he started with
by mrspeaker 11y ago
I love that this code is so elegant, but (and!) chooses strings and string manipulation for storage of the possible cell values.
It seems like he started with lists and switched when he got to the search method ("This is why I chose to implement the set of possible values for a square as a string: I can copy values with values.copy() which is simple and efficient.") - It's probably not an amazing insight, but I'm sure my brain would have been yelling at me "don't use strings! don't use strings!".