Skip to content

Commit f393e2f

Browse files
committed
Runtime: 10 ms (Top 6.43%) | Memory: 8.1 MB (Top 24.14%)
1 parent 239a710 commit f393e2f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
// Runtime: 10 ms (Top 6.43%) | Memory: 8.1 MB (Top 24.14%)
12
class Solution {
23
public:
34
int sumOfUnique(vector<int>& nums)
45
{
56
int sum=0;
67
map<int,int>mp;
7-
8+
89
for(auto x:nums)
910
mp[x]++;
10-
11+
1112
for(auto m:mp)
1213
{
1314
if(m.second==1)
1415
sum+=m.first;
1516
}
1617
return sum;
1718
}
18-
};
19+
};

0 commit comments

Comments
 (0)