How is the given test case true?

if we divide the given test case into two sequence both are increasing…!!

See in this testcase there is no dec part…that is why we are having only one incr sequence…the idea is that once the seq strats incr it cant decrease

1 Like

According to the question, the following possibilities may arise after splitting a sequence into two sequences:

-First Sequence is strictly decreasing , 2nd sequence is strictly increasing–> return true
-First Sequence is strictly increasing, 2nd sequence strictly decreases-------> return false
-If one sequence is empty and the other sequence is strictly increasing/decreasing—>return true.

1 Like

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.

1 Like