Increasing decreasing sequence

Not getting code part for this

hi @kumarakash121005
all this ques says is u have to check if the sequence of numbers given is first strictly increasing and then strictly decreasing…
so all the potential ans are-

  1. its just strictly increasing eg. 1 2 3 4 5
  2. its just strictly decreasing eg. 5 4 3 2 1
  3. first strictly increasing then strictly decreasing eg. 1 2 3 5 4 3 (here it increased till 5 then it is a decreasing sequence till end)

refer this code --> https://ide.codingblocks.com/s/643806

It’s giving output as false on input of 123543

hi @kumarakash121005
i misread the ques… it states first sequence is strictly decreasing and second is strictly increasing. therefor all the valid sequences would be

  1. its just strictly increasing eg. 1 2 3 4 5
  2. its just strictly decreasing eg. 5 4 3 2 1
  3. first strictly increasing then strictly decreasing eg. 5 4 3 1 3 6 (here it decreased till 1 then it is a decreasing sequence till end)

code is same… i just gave the explanation of reverse…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.