5
1
2
3
4
5
It is strictly increasing sequence than how does it satisfy the question ? How the o/p is true ?
Test Case wrong
@namandubey20 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.
So for input:
5
1
2
3
4
5
Output: true (since it belongs to case 3)