Skip to content

Commit 935bc37

Browse files
committed
FEAT : upload #217
1 parent a1685a6 commit 935bc37

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

contains-duplicate/crumbs22.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <iostream>
2+
#include <vector>
3+
#include <unordered_set>
4+
5+
using namespace std;
6+
7+
class Solution {
8+
public:
9+
bool containsDuplicate(vector<int>& nums) {
10+
unordered_set<int> uset(nums.begin(), nums.end());
11+
return (nums.size() != uset.size());
12+
}
13+
};

0 commit comments

Comments
 (0)