Problem Link
My Solution

Please give test cases and some reason plsss

10 2 10
1 1 1 1 1 1 1 1 1 11

1 Like

Thanks for the test case will the answer be 2

we are in the same boat at the moment…

i dont know if there are any other corner cases

Edit there are no corner cases indeed, i had little error in my code above : AC

1 Like

Your code is very correct except a minor mistake…

you are breaking loop if you are at last element of the array. and not actually computing last element of the array.

here is your AC.

1 Like

hey @sirearsh thanks a lot got AC: Solution