Longest Subarray with sum divisible by k

I want to the know the solution.I am stucked on this problem.

@Kumarrituranjan2056
you can solve with using simple hashing technique. Read this article and refer code if needed

i didnt get the concept …how the length is calculated when the remainders aresame

@Kumarrituranjan2056
What do mean by remainder is same? You have hash map for remainders. just store smallest index in that position of hashmap