Divisible subarrays run-error

I have attempted the question same way as shown in video but still it is giving run error for second testcase. Kindly check. https://ide.codingblocks.com/s/104084

hey @urvigoel26, just add a statement sum=sum%n; after sum+=arr[i];

1 Like

hey @urvigoel26 , if your query is resolved. Please mark this doubt as resolved and rate me on the basis of your experience.
rating option will appear when to mark this doubt as resolved

1 Like