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 ace8fbaCopy full SHA for ace8fba
contains-duplicate/gitsunmin.ts
@@ -0,0 +1,8 @@
1
+/**
2
+ * https://leetcode.com/problems/contains-duplicate/
3
+ * time complexity : O(n)
4
+ * space complexity : O(n)
5
+ */
6
+function containsDuplicate(nums: number[]): boolean {
7
+ return new Set(nums).size !== nums.length
8
+};
0 commit comments