why you are adding k in arr[i] % k, I don't get it (in -1 % 3 example)
@JeevanKumar-codeАй бұрын
In some languages like Java -1%4 will give you -1, which is wrong (as remainder should always be +ve by definition). so we add -1+4 = 3. However in other languages like python -1%4 will give you 3 directly.