https://leetcode.com/problems/continuous-subarray-sum/
It works on this principle:
If for [0, i] : sum is sum2 and remainder is x when divided by k , and there is another subarray [0,j] where j < i, has sum = sum1 and remainder is x when divided by k. Then
sum1 = k * m + x
sum2 = k * n + x
Then sum2 - sum1 = k(n-m)
Based on above the solution to the problem is:
https://leetcode.com/problems/continuous-subarray-sum/submissions/

