Inc. & Dec. sequence

can you give another example of input along with output so that i will understand the problem in a better way.

Yeah .
5
5
4
1
2
3
Output should be true, because 5,4,1 is decreasing and 1,2,3 is increasing.

bhya how 1 2 3 4 5 gives the ouput yes as it is only strictly increasing only and there is no seperation

Yeah one of them may have length 0, just the combination of two should cover the entire array

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.