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 6d6a640 commit b1728a9Copy full SHA for b1728a9
contains-duplicate/prgmr99.js
@@ -0,0 +1,10 @@
1
+/**
2
+ * @param {number[]} nums
3
+ * @return {boolean}
4
+ */
5
+var containsDuplicate = function (nums) {
6
+ const numArrLength = nums.length;
7
+ const numSetSize = new Set(nums).size;
8
+
9
+ return numArrLength !== numSetSize;
10
+};
0 commit comments