Increasing Decreasing Sequence

One test case is failing …please can you tell the mistake or the case i have left in the code.

Hey @Anshit, for a test case like :

5
1
2
2
3
4

your code produces the output as true. But if there are any 2 consecutive same digits , then the code should print false. Please try to put that condition too and your code should be working then.

Hope this helps.
Happy coding :slight_smile: