Biotonic subarray

it isn’t giving the required output , please suggest required changes

hello @Anushka_Jha
a)
image
use < in place of >

b) initialise inc[0] =1 and desc[n-1]=1

thank you .
the code passed 3 out of 4 test case after i made the changes you suggested.
but second test case failed ( TLE). what changes should i make to my code for that.

no furthur changes needed ,it is passing all test cases

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.