Increasing decreasing sequence

1 testcase is not passing. Someone pls tell me the error

Hey bro !! You are not considering when the elements are equal.
For ex.
5
1
1
3
4
5
Your code is giving true for this. Although the answer for this is false
Please try this out and correct your code.
In case you face any difficulty I will help you out.
And if you understand this please rate well and provide the feedback so that we can improve ourselves.
Thanks :smiley: