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 d0000e8Copy full SHA for d0000e8
contains-duplicate/wooseok123.js
@@ -0,0 +1,7 @@
1
+// TC : O(n) | SC : O(n)
2
+
3
+function containsDuplicate(nums) {
4
+ let original_length = nums.length;
5
+ let modified_length = new Set(nums).size;
6
+ return original_length !== modified_length;
7
+}
0 commit comments