We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dc74e4 commit b5b6294Copy full SHA for b5b6294
1 file changed
contains-duplicate/j2h30728.js
@@ -0,0 +1,8 @@
1
+/**
2
+ * @param {number[]} nums
3
+ * @return {boolean}
4
+ */
5
+var containsDuplicate = function (nums) {
6
+ const set = new Set(nums);
7
+ return set.size !== nums.length;
8
+};
0 commit comments