How is it a pigeon hole problem?

I understood the concept (b-a)%n=0 implies b%n=a%n, to select a subarray we need start and end positions, hence for answer is sum of freqC2 where (b-a)%n=0 satisfies. But I cannot understand it as a pigeon hole problem!

hey @mayankA47, if you look clearly atleast one the value in freq array is repeating. Thats what pigeonhole principle say, atleast one hole has more than 2 pigeons

How is it a pigeon hole problem?

hey @mayankA47, concept of piegonhole is used here because atleast one the value in freq array is repeating. Thats what pigeonhole principle say, atleast one hole has more than 2 pigeons.