please tell me the approach to solve this question
Could not get logic to solve the question
is ques clear to you?
yes, i understood question but could not think about the logic to solve ths
iterate over array and check if current element is greater or smaller than previous element
case1 : if it is greater means sequence is increasing here now for next time it can’t be decreasing
case2: if it is smaller than previous then it should not increasing before it
if these condition not hold true ans is “false” otherwise “true”