INCREASING DECREASING SEQUENCE

1
2
3
4
5
CAN YOU PLEASE TELL ME , HOW THIS IS INCREASING DECREASING SEQUENCE?

According to the question, the following possibilities may arise after splitting a sequence into two sequences:

-First Sequence is strictly decreasing , 2nd sequence is strictly increasing–> return true
-First Sequence is strictly increasing, 2nd sequence strictly decreases-------> return false
-If one sequence is empty and the other sequence is strictly increasing/decreasing—>return true.

Your example satisfies case 3.

ok thanks., Do we need to use arrays for solving this question?

Yes…you have to use arrays

But this question is in “Programming Fundamentals Module” and till now we haven’t study arrays.

Actually you can also do this without any array
Refer this Can you please tell me how to approach this question for the approach.

Ohk Brother, Thanks For your help.

Hey bro, i’d just made the code of this problem and all test cases were also passed. So, Can you please check whether the approach i’d used is right or wrong?

Okay, you can share your code. Save your code on ide.codingblocks.com and share its link.

okk, thanks. . . . .