You are given an integer array nums.
A pair of indices nums.length and the following two conditions are satisfied for $a = $ nums[i] and $b = $ `nums[j]$:
Return the total number of perfect pairs in nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
A pair of indices nums.length and the following two conditions are satisfied for $a = $ nums[i] and $b = $ `nums[j]$:
Return the total number of perfect pairs in nums.
Constraints:
nums.length
nums[i]