Problem 3164 · Medium

Find the Number of Good Pairs II

Group equal values of nums1 and, for each nums2 value, add the groups whose value is divisible by nums2[j] * k.

Open the interactive visualisation