Pls tell the mistake
Increasing or decreasing sequence
First of all, check the constraints Constraints
0 < N < 1000
But you have limited the size of your array to 100.
Also
Consider test case:
For input:
6
3
2
1
1
2
3
3 2 1(decreasing) and 1 2 3(increasing)
So Expected Output:
true