1512. Number of Good Pairs
https://leetcode.com/problems/number-of-good-pairs
Description
Given an array of integers nums
, return the number of good pairs.
A pair (i, j)
is called good if nums[i] == nums[j]
and i
< j
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= nums.length <= 100
1 <= nums[i] <= 100
ac
Last updated