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 ee1ad8e commit caa36e5Copy full SHA for caa36e5
contains-duplicate/wogha95.js
@@ -0,0 +1,10 @@
1
+// TC: O(N)
2
+// SC: O(N)
3
+
4
+/**
5
+ * @param {number[]} nums
6
+ * @return {boolean}
7
+ */
8
+var containsDuplicate = function (nums) {
9
+ return nums.length !== new Set(nums).size;
10
+};
0 commit comments