Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 39fd1a4

Browse files
committed
fix: 숫자짝꿍 풀이 참고 내용 추가
1 parent 6cdf4df commit 39fd1a4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎level-1/숫자짝꿍&131128&.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
// 정답 1 - ssi02014
2-
// 길이가 3,000,000 이므로 객체를 이용한 연산 횟수 최적화 풀이
1+
/**
2+
* 풀이 - ssi02014
3+
* X, Y의 길이가 굉장히 길어서 공통 숫자를 뽑아낼 때 객체를 이용해 연산 횟수 최적화
4+
* X, Y를 배열로 변환 후에 배열 메서드를 사용해도 되지만, for of문보다 효율성 떨어짐
5+
* (테스트 케이스 11 ~ 15 100ms~200ms 차이)
6+
*/
37
function solution(X, Y) {
48
const commons = [];
59
const obj = {};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /