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

@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:

1

6

6 1 2 3 4 5

your output is 6 but correct answer is 10