Skip to content

Commit

Permalink
1512
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Jan 30, 2022
1 parent 9921a63 commit 9151cb9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions E_1512_NumberOfGoodPairs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public class Solution {
public int numIdenticalPairs(int[] nums) {
int sonuc = 0;
for (int i = 0; i < nums.length; i++) {
for (int j = 0; j < nums.length; j++) {
if (nums[i] == nums[j] && i < j){
sonuc++;
}
}
} return sonuc;
}
}

0 comments on commit 9151cb9

Please sign in to comment.