Coding Games and Programming Challenges to Code Better
Send your feedback or ask for help here!
I passed all the 5 tests, but when I submit the code, ā5ā test is failed.
Can someone explain me and give me any clue why it is happening?
I know that it was design to prevent hard coded solutions, but it useful, not informal.
It might be a bug in the puzzle.
I have the same thing but for test ā1āā¦ Itās more likely that thereās some edge case in our code that our solution doesnāt handle, rather than a bug in the puzzle - but thereās no way to know what that edge case isā¦
I also had a problem with Validator 1.
It checks if you consider that you canāt reach a spot if number of moves is greater or equal to distance from the starting point of an orc to that spot.
For below input, your solution should answer with āIMPOSSIBLEā:
2
1
1
1 0
2 0
2 1
0 1
0
1
Thatās awesome! Fixing that one broke a few of my regular case, but it was nothing a little spaghetti code (for the edge cases) couldnāt fix. Thanks!
Is the problem fixed, or do you want me to look into it?
eulerscheZahl really helped me and gave me a clue to ālook backwards for some routesā
You should keep in mind that you should always visit closes indexes in the beginning, in my case the order of indexes were mixed in linkedList so I was visiting not the closest index.