I’ve done the question, the code passes all test cases except test case 0.
I begin with assuming that the series is decreasing to begin with and update it to increasing when it happens and print the output.
Code:
I’ve done the question, the code passes all test cases except test case 0.
I begin with assuming that the series is decreasing to begin with and update it to increasing when it happens and print the output.
Code: