Hey, This is my approach for the Increasing decreasing problem:
I’m not able to pass one test case out of the ones listed. Please can you help?
Thanks !
Hey, This is my approach for the Increasing decreasing problem:
I’m not able to pass one test case out of the ones listed. Please can you help?
Thanks !
your code seems great. It does not cover one case i.e. when two consecutive numbers are same in the sequence. For example if your test case is like :
5
2
2
2
3
4
Then the output should be false. But your code returns true ! So kindly cover that case as well.
I hope this resolves your doubt !
Happy Coding 