After several attempts i m unable to run more than 77.8 test cases pls help me out

after several attempts i m unable to run more than 77.8 test cases pls help me out.

your approach is not completely correct that’s why it is not passing all testcases
see the code below

correct approach

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved

in the soln the line if(inc) signifies ??

yes
if sequence is increasing then it can’t be decreasing