I am getting wrong output
Regarding this question
Hi… ur approach is not right. what u are doing is simply checking if whole array is strictly increasing or strictly decreasing… but in question it is mentioned that check if it is possible to split sequence into two sequences -
s1 to si and si+1 to sN such that first sequence is strictly decreasing and second is strictly increasing.
this means some part of initial array can be strictly decreasing and other strictly increasing…
refer this https://ide.codingblocks.com/s/588528
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.