Weirdness in the "Paper labyrinth" puzzle


#1

I tried to solve the “Paper Labyrinth” medium difficulty puzzle in Python3 using the dictionary representation for graph and searching for shortest path with BFS. All four test cases checked out fine, but then the submission validator failed the fourth “House of Cards” test. I had no success with several different data representations. I even included the test for the case that the labyrinth might have opening to outside of the board, but to no avail. Then I solved the puzzle in C with the same logic and it was accepted on the first run by all four submission validators. Does anyone have insight into what could be different with the “Paper labyrinth” submission validator 4 for Python3?


#2

My solution uses Python 3.


#3

As soon as I dropped the graph representation middle layer and did the walk on the board data directly, then the solution got accepted also in Python3. Must have been some logical fallacy in my earlier code, but I can’t pinpoint it :frowning: