WALK prob WA

I tried solving the WALK problem using the editorial but I am getting WA. Kindly tell me the error :slight_smile:


@sandy999 : You logic is wrong . The answer to the problem is max(a[i]+i) for i from 0 to n-1 .

1 Like

try this test case:



6 1 2 3 4 5

your output is 6 but correct answer is 10

Thanks @vineetpaliwal I finally got AC :smiley: