Skip to content

Commit 1b9b970

Browse files
committed
containsDuplicate 에 TC, SC 주석 추가
1 parent a0e762a commit 1b9b970

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

contains-duplicate/junzero741.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TC: O(n)
2+
// SC: O(n)
13
function containsDuplicate(nums: number[]): boolean {
24
const uniqueNums = new Set<number>(nums);
35
return uniqueNums.size < nums.length

0 commit comments

Comments
 (0)