Unablr to understand why the output is yes
Hey Mayur, read the ques carefully the sequence is valid if its purely increasing or purely decreasing or first decreasing and then increasing. In given sample input sequence is purely increasing that’s why output is true.
But in Question or not mentioned i ask for true or false if sequence can split in two sequence
here s=1 2 3 4 5
can be split into
s1=1
s2=2 3 4 5
here s1 is decreasing
and s2 is strictly increasing
so output is true
.
.
got it?
In question.
Line 3 : compute if it is possible to split sequence
Line 5 : Print true/false as output
How s1 is decreasing as s1 is 1 only
Single integer is Strictly increasing and strictly decreasing in itself. Got it?
Sir i am unable to understand as 2,3 all are integers
i m not getting your point. Elaborate pls
?? Unable to understand this “Single integer is Strictly increasing and strictly decreasing in itself. Got it?”
Bro It is common sense that u can consider single integer as either increasing or decreasing according to your solution.
Here in this question by considering single integer is strictly decreasing our output is matching with sample output mentioned in question. So we are considering single integer as decreasing .
Sir upar sanjeetboraa sir ne likhaa tga series is strictly increasing
Single integer is also a series of length 1 which can be considered as strictly increasing or decreasing.