my code is showing wrong answer for test case 2…please tell me the mistake and also mention the test case in which the code dosen’t work…
My code is showing wrong answer for test case 2....please tell me the mistake and also mention the test case in which the code dosen't work
Here, in the problem for ith element you need to print the maximum number of consecutive days before (i+1)th element less than or equal to ith element, but your code won’t work when suppose you have array as 1 2 4 3 5. For 5 the ans should be 5 but your code will output 2.