Problem title-increasing decreasing sequence

https://ide.codingblocks.com/s/61138
only 5 test cases passed out of 9

Hi Atishay, you can see in your code in line no. 18 - 21. That false will only be printed when 2 elements of the array are equal. But what happens if I give you

5
1 2 3 4 5

Pls check your code again. Also it is mentioned in the code that you cannot use arrays or lists. Kindly try this question again without using array now.