Given an array of integers
nums
, return the number of good pairs.A pair
(i, j)
is called good ifnums[i] == nums[j]
andi
<j
.
1 | class Solution { |
Given an array of integers
nums
, return the number of good pairs.A pair
(i, j)
is called good ifnums[i] == nums[j]
andi
<j
.
1 | class Solution { |