Not getting AC in Warmhole problem.

algorithm
array
nzec

#1

I have been trying to solve Warmhole problem but I am getting not getting AC in two cases. I am getting NZEC for this two cases.

Here is the link to my solution, anyone please help me to figure out what is wrong in my solution.


#2

The problem was with your IO (and might be with binary search, but not sure).

I have edited your binary search part (only a bit) + replaced IO with my template (feel free to copy, if you need) and here’s the link to your corrected solution.


#3

Anyone please answer this.


#4

@utkalsinha @vijju123 @kauts_kanu

Help me in solving this problem.


#5

I am unable to make out why you are getting runtime error :confused: Everything looks fine to my eye.


#6

@mathecodician

Please help me with this.


#7

I’m having a look at your solution. (Expecting an index out of bounds error).

Meanwhile, you might try to find the bug using my java AC solution.