Skip to content

Commit

Permalink
Time: 0 ms (100.00%), Space: 7.3 MB (59.43%) - LeetHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanketkadam143 committed Nov 28, 2022
1 parent 2769ed7 commit 3d13334
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 1512-number-of-good-pairs/1512-number-of-good-pairs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class Solution {
public:
int numIdenticalPairs(vector<int>& nums) {
int counter=0;
for(int i=0;i<nums.size();i++){
for(int j=i+1;j<nums.size();j++){
if(nums[i]==nums[j])counter++;
}
}
return counter;
}
};

0 comments on commit 3d13334

Please sign in to comment.