Increasing Decreasing squence

It is showing time limit in second test case.
https://ide.codingblocks.com/s/50019

Hi Rishabh, consider the input when all the numbers are same, like
5
2
2
2
2
2
The output should be false, but your code doesn’t print anything in that case.

Hi Rishab, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.