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 5afc675 commit 4da73d7Copy full SHA for 4da73d7
contains-duplicate/mmyeon.ts
@@ -10,5 +10,5 @@
10
* - nums 배열의 길이만큼 set에 담으니까 O(n)
11
*/
12
function containsDuplicate(nums: number[]): boolean {
13
- return nums.length !== new Set([...nums]).size;
+ return nums.length !== new Set(nums).size;
14
}
0 commit comments