HTMLify

LeetCode - Find the Number of Good Pairs - Go
Views: 1 | Author: abh
func numberOfPairs(nums1 []int, nums2 []int, k int) int {
    var count int
    for _, i := range nums1 {
        for _, j := range nums2 {
            if i % (j*k) == 0 {
                count++
            }
        }
    }
    return count
}

Comments