How is the sample input satisfies the condition?
Didn't understand the sample input
Hey @vineetchanana, the question is a bit confusing. Let me clear it out for you. It says that a sequence can be of following cases :
- Only increasing sequence
- Only decreasing sequence
- Increasing and then decreasing sequence
- Decreasing and then increasing sequence
You have to write the code such that when your input sequence is any of cases 1,2 or 4β¦the output should be true. Else for case 3, the output should be false.
Also take care of the case when two consecutive numbers in the sequence appear to be the same. In this case again the output should false
Hope this breaks down the logic into simple steps so that you can implement.
Please mark the doubt as resolved in your doubts section ! 
Happy Coding !
1 test case is failing. Please help in that.
Hey @vineetchanana, I would be happy to help ! But please create a new thread (new doubt) for that query.
Thanks and Happy Learning ! 