(int[] nums)
| 1 | class Solution { |
| 2 | public int numIdenticalPairs(int[] nums) { |
| 3 | int numGoodPairs = 0; |
| 4 | |
| 5 | for (int i = 0; i < nums.length; i++) { |
| 6 | for (int j = 0; j < nums.length; j++) { |
| 7 | if (i == j) continue; // cannot check against itself |
| 8 | if (nums[i] == nums[j] && i < j) numGoodPairs++; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | return numGoodPairs; |
| 13 | } |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected