← ALL NOTES
Array

2176. Count Equal and Divisible Pairs in an Array

Given nums and k, count pairs (i, j) with i < j, nums[i] == nums[j], and (i·j) divisible by k. Brute-force all pairs, checking both conditions.

Loading…