Conflict between problem and output format

n this problem statement question is saying to first sequence is strictly decreasing and second is strictly increasing. Print true/false as output. but in output sstatement it is saying tto whether the sequence is increasing - decreasing or not. i am confusing whether i haave to check first inc then dec or first dec than inc my test case 0 is wrong except this all test cases are correct

:bulb: Increasing Decreasing Sequence 0:0

Hello @Uddeshya23, i think you get confused with the problem statement. See the statement is
that first sequence is strictly decreasing and second is strictly increasing so by this what do we mean is that we need to find the largest subsequence such that initially, the elements are decreasing and then increasing. So, in this case, we can also consider the whole increasing or whole decreasing cases.
For eg. given sequence is 1 2 3 4 5
Then we can say that it’s decreasing part is 1 and then after increasing part is 2 3 4 5
Or if we get a sequence 5 4 3 2 1
Then we can say that it’s decreasing part is 5 4 3 2 and increasing part is 1.
Pls, try to understand if we need to maintain the dp states we need to consider each and every element. Here you can also say that you searched for strictly decreasing part you didn’t get any and after that you searched for the increasing part and as we want to maximize the sum of them so we are taking it.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!

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.