Increasing decreasing sequence

This is my code and it is passing all the test case except text case no 8. Can some one help me out

@Legendankit
Hello Ankit,
working on it

OK…even your getting the same error ?

@Legendankit
Hello Ankith,
your code is correct.
for test cases like
2
2 2
actual output - false
your output - true (i also think it should be true )
so dont worry it is just ambiguity in question.
reference solution-https://ide.codingblocks.com/s/177248

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.