In the sample input, the whole array is strictly increasing. We have to print true if the whole array can be divided such that one is increasing and the other is in decreasing order. Since there is no decreasing elements in the input array how can output be true?
Increasing decreasing problem
hello @1ms18im021
5
1
2
3
4
5
u can split it like this
{1} {2,3,4,5}
first one can be treated as decreasing and the second one can be treated as increasing
if the array is of size 1 or 2, will that be true case?
yeah u can say that . . . . .
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.