Not all test case passed

INCREASING DECREASING SEQUENCE
https://ide.codingblocks.com/s/51295

Hey Shubham, check your code for this case
input:
4
2
2
2
2

your code’s output:
true

but the expected output is:
false

for
4
2
2
2
2
it is coming false

https://ide.codingblocks.com/s/51303

Hey, your code is not generalized as for
input:
5
2
2
2
2
2

it is giving output true