Doubt in sample input

in the sample input, it is only increasing and not decreasing, so why the output is given as true?

Hi @apoorvsingh27,
See the input must be first increasing and then decreasing that means in this sample input case there are all the elements in the increasing set and none in decreasing set so the decreasing set is a empty set .So this sample test case is a valid test case.
Just to add please make sure that the sequence is first increasing and then decreasing only. However the increasing or decreasing set may be empty.

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.