Can you help me in finding out the reason of failed test case

Test case 0 is giving me run time error, kindly rectify my code.

hey @7nishit since it is not mentioned in the constraints, you dont know the upper bound of n so i would suggest you to make array a of size n instead of 1000.

It’s not working even after doing that.

@7nishit i am extremely sorry for the late reply, but your base case is wrong instead of s>=e it should be s>e

it is still not working

@7nishit
I have corrected your code. Made just some minor changes in the base cases.


Now, It passes all the test case.