Circular Array Loop

Arithmetic exception is coming. please help me find the reason for the same.

ur code is working fine
just that it does not pass 2 test cases

Unable to figure it out why two cases are failing.


refer to this article if still u are unable to figure out please ping back

Yeah got the point.actually I was not considering the self loop. thank you so muchπŸ˜ƒ

1 Like