-
-
Notifications
You must be signed in to change notification settings - Fork 247
[HoonDongKang] WEEK 01 solutions #1160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전체적으로 코드를 보면서 많은 공부가 되었습니다.
보기 좋게 설명과 정리까지 작성해 주셔서 감사합니다.
*/ | ||
|
||
function containsDuplicate(nums: number[]): boolean { | ||
// 시간복잡도: O(n^2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
풀이 별로 함수 분리, 알고리즘 복잡도 주석 설명
위 두 가지 부분이 너무 좋다고 느꼈습니다!!
정리가 잘 되어 있어서 코드를 읽기도 쉬웠고,
나중에 다시 볼 때도 좋은 방식이라고 느낍니다.
저도 다음부터는 이렇게 정리하면 좋겠다고 느꼈고,
깔끔하게 작성하는 것에 대해서 좋은 공부가 되었습니다.
감사합니다!
function differenceMap(nums: number[], target: number): number[] { | ||
const diffMap = new Map<number, number>(); | ||
|
||
for (let [i, num] of nums.entries()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entries를 사용해서 for문 돌리는 방법도 있었네요.
풀이 방법을 보면서 많이 공부가 되었습니다..!
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!