Skip to content

Commit b5b6294

Browse files
committed
Contains Duplicate
1 parent 7dc74e4 commit b5b6294

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

contains-duplicate/j2h30728.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)