Increasing Decreasing Sequence

Sir/Maam
Q1) Will two equal values in the sequence result false?
Q2) What is the limit of ‘i’ in (s1 to si) and (si+1 to sN) ?
Q3) what will be the output for n=1, n=2, n=3 because from n=4 it can be divided into 2 parts easily .
Q4) How in the sample input from 1 to 5 is first strictly decreasing and then increasing ? What is i for this?

Hi @Ekram,
Answer 1. Yes
Answer 2.First set can be empty … Like there may be no element in s1 to si and the set (si+1 to sN) be s1 to sN having all the elements.
Answer 3- No think it again … It cannot be divided from n=4… For n=1 n=2 n=3 the output will be according to the testcase …
Answer 4- In that input the set containing decreasing is empty and all the elements are in increasing set… Like i said in answer 2 … THe first set can be empty.