Um... If you just make this version in the first place, i'd be glad to rate.
This solution, is just a direct translation of my other solution...
This comment is hidden because it contains spoiler information about the solution
Hmm, your answers differ from mine for large Integers (> maxBound :: Int)
I should have included some tests for very large Integers
I think the reasoning for the first image is: if cell (1,2) and cell (2,2) are both part of the house, then that's a contiguous space, and the mouse is actually running across an open floor (which it's not allowed to do).
In the second image, the corners of two cells touch, so you have the same "crossroads" form that you could also get from intersecting line segments. Arriving at the crossroads, the mouse COULD politely turn left/right to define a contiguous area -- OR it could squeeze straight through the infinitely tiny corner, loop around the central square, and then cross its own path again. So that shape isn't permitted to exist in the house either.
Dont you see the return line? Isnt it weirdly complex?
It is simply a guessing game when the reference solution is incorrect.
Did you figure out how to "solve" the problem with the random test solution code or does your code accidentally contains the same bug?
nice! Now we just need python 3.8.
Never noticed this API
Try to start this solution again, and improve algorithm reproduce changes in old string to get new string.