Please give me a hint on how to solve this problem …
I didn't get what this question is asking ,Please help me through this Question
u are required to tell whether the input array is strictly decreasing and then strictly increasing
there are 3 possibility:
- can be entirely increasing
- can be entirely decreasing
- decrease then increase
what is not possible
increase then decrease
decrease increase decrease
so take a flag which changes once u see change in pattern
if there is change for the second time return false
But even though I tried 2 times only I am able to clear 2 test cases …Can I have any sample code to refer?
Hey @gvspraveen113
Have a look at this https://www.geeksforgeeks.org/split-the-array-elements-into-strictly-increasing-and-decreasing-sequence/
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.