Increasing Decreasing Sequence

Hello Buddy, Please Help me what is the issue in my code Please and they told dont use array and list

@s.v Hey buddy lemme review ya query!

@s.v Bro you are missing the important part that is strictly decreasing than increasin
5
4 1 3 5 6

Your answer : - false
Correct :- true
4 1 strict dec then 3 5 6 strict inc.

This is most important case.
Here i am giving you my code for reference without any additional space.
Also dont forget to mark the dobut reolved and rate full.
Happy coding bro!