Test Case wrong

5
1
2
3
4
5
It is strictly increasing sequence than how does it satisfy the question ? How the o/p is true ?

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

  1. First Sequence is strictly decreasing , 2nd sequence is strictly increasing–> return true
  2. First Sequence is strictly increasing, 2nd sequence strictly decreases-------> return false
  3. 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)