Easy
Given an array nums, a pair (i, j) is good if nums[i] == nums[j] and i < j. Return the number of good pairs.
nums
(i, j)
nums[i] == nums[j]
i < j
Input: nums = [1,2,3,1,1,3] Output: 4
Input: nums = [1,1,1,1] Output: 6