https://online.codingblocks.com/player/28486/content/4667/4801
one testcase is failing, why?
Inc. dec. sequence
there are two mistakes that your code is facing:
-
This is not producing output if the sequence is strictly decreasing.
Example: 5 5 4 3 2 1
Your Output:
Expected Output: true -
As the question ask you to check for “strictly” functions. So, it should not accept the sequence if it contains consecutive same numbers
Example: 4 3 3 2 4
Your Output: true
Expected Output: false
Hope, this would help.
If you still have problem, feel free to ask.
1 Like