Code on pc working fine , but not online

programming
Tags: #<Tag:0x00007f2424cea1e0>

#1

My code s giving correct answer on my pc . but it is not giving correct online. dont know why it is happening


#2

Check Your PC. @aman_dhapola_934


#3

same happened with me in test case -4, -2, 0, -6, -1


#4

Oh i got it, somewhere the iterator will be out of bound, which is ignored by your ide’s compiler but not in interview bit’s compiler