Unable to understand the code of good subarray using pigeonhole principle

Can someone please provide me their number, I couldn’t understand even one line of code of the problem ‘Good subarray’ using pigeonhole principle.

Hey @Tiwary725 we are simply using the pigeon hole principle to prove that answer would exist if number of elements is less than N( the number with whom we are taking modulus with).
Apart from that its just simple implementation.
For example we have the same mod at index i and index j, then what the code is simply doing is ,is choosing these two as possible combination to represent a subarray.
Just look at how the modulo is working by doing some examples manually and you’ll understand as to what is happening.