sir
in sample test case i.e
1
2
3
4
5
all of these are strictly increasing,thus there is no possibility of getting a number before which sequence is decreasing and after that it is increasing
confused??
or if take permutation of any sequence of more than two distinct numbers that will always have a permutated sequence follwing these conditions.