I am unable to approach this question. Can you help me in seeing in the right direction to solve this question ?
How should i approach this question?
Hello @abhishek.personal.email,
you donβt have to split any sequence.
what you are required to do is to keep track of whether the sequence is:
- strictly increasing (entirely)
- strictly decreasing (entirely)
- First strictly decreasing than strictly increasing
if yes,
print true
else,
print false
strict function: which do not contain the same number at consecutive positions i.e. same values cannot occur one after other.
Hint: there should be no decrease in sequence if it once starts increasing i.e. first increasing than decreasing returns false.
Hope, this would help.
if you still have doubts, feel free to ask.
1 Like