Google Foobar Challenge Java Issue

I just got invited for Google Foobar Challenge like many other developers.
Befour you read further my issue I assume you have given Google foobar challenge.
I was solving the level 1 . And the problem was easy.
But when I coded the solution in java.I was continuously getting TestCase failed. Even though I checked the output for the visible test case which was given as sample input and output in the question.It was right. But when I Verify it on the foobar site it said testcase failed.
I was very confused. I was confident that nothing is wrong with my solution. So i coded it in python with same logic and it got accepted.
Anyone who encountered same issue in the challenge… Plz help me clear this doubt what went wrong.

1 Like

I think the problem you are talking about is PREPARING THE BUNNIES ESCAPE, which needs graph algorithm to solve. The problem with JAVA is that if you look at the input , more importantly the way they are giving input. In the input a 2-D array was passed as parameter directly instead of saving it into a variable and than passing .JAVA being as static language does not allow this and as python is a dynamic language so this is possible in it. I don’t how they could have messed this up …it took so much of time to find this error.

1 Like