Number of Good Pairs
Easy
Arrays
Array
Hash Table
Math
Count pairs (i,j) where i
Constraints
1 ≤ len ≤ 100
Examples
Example 1:
Input: 1 2 3 1 1 3
Output: 4
Example 2:
Input: 1 1 1 1
Output: 6
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console