Doubt in Hackerearth May Easy Challenge

Hi everyone,

i have done the Panda and Maximum product problem in May Easy challenge and got 60 points for my submission whereas one of my friend got 100 points with the same approach.

Seriously, i couldn’t understand where my code is failing to get 100 points and please can anyone find out the difference between the two codes(both codes are following the same approach).i would be very thankful if i come to the error in the 60 points code for not getting full points.

This is my code(60 points)

Friend’s code(100 points)



When I changed the size of your array from n to 100001, it gave 100 pts.

Hope you can figure out something from here.

1 Like