Question hi samajh nhi aaya
Sir question samjhado
Question is
you have to check whether the given array can be split into two
such that first sequence is strictly decreasing and second is strictly increasing
but in the sample input the condition is not satisfied and yet the output is true
given input is
5
1 2 3 4 5
first decreasing sequence is of size 0
and then increasing sequence is of size 5
so output should be true
NOTE: decreasing or increasing sequence can be empty sequence
that means for completely inc and completely dec sequences output should be true
but by this way the answer will always be true
NO
for this inpt
1 2 3 2 1
output is false
first dec which is empty
then increasing 1 2 3 but after that dec which is wrong
hence ans is false
case 1: 12345
case 2: 54321
case 3: 32124
these cases are true as you have to find (strictly increasing) or (strictly decreasing) or (strictly decreasing and strictly increasing).
case 4:12321
case 5:12234
these cases are false because in case 4 it is strictly increasing and strictly decreasing and in case 5 it is not strictly increasing it is simply increasing.
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.