#3164
Find the Number of Good Pairs II
expert · 1155 · lc medium +32 · 26.6% accepted · 254 likes · top 5%
Description
Given integer arrays nums1 (length n) and nums2 (length m) and a positive integer k, a pair (i, j) is good when nums1[i] is divisible by nums2[j] * k. Return the total number of good pairs (for the larger-constraint version).
Code
1
2
3