Skip to content

Commit 7f3667e

Browse files
committed
주석 추가
1 parent a120aa8 commit 7f3667e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

contains-duplicate/haung921209.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ public:
1111
};
1212
```
1313
14+
- set으로 단순비교. 편리하나, 정렬에 비해 시간이 오래 걸림.
15+
- unordered_set을 쓰면 set 방식에서 조금 더 빠를 수는 있음
16+
1417
```cpp
1518
class Solution {
1619
public:
@@ -26,3 +29,4 @@ public:
2629
};
2730
```
2831

32+
- 둘 다 O(n logn)의 시간 복잡도이나, 자료 특성 상 정렬이 더 빠름

longest-consecutive-sequence/haung921209.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ public:
2828
};
2929
```
3030

31-
- 순서 유지 조건 없음
31+
- 순서 유지 조건 없으므로, insert와 정렬을 동시에 할 수 있는 우선순위 큐 사용
32+
- 전체 정렬이 필요할 경우 정렬이 더 유리할 수 있으나, 최적화 여지가 우선순위 큐가 더 커서 사용
33+
- ex) 탐색 중단 조건 등

top-k-frequent-elements/haung921209.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ public:
2020
}
2121
};
2222
```
23+

0 commit comments

Comments
 (0)