-
-
Notifications
You must be signed in to change notification settings - Fork 304
[Blossssom] WEEK 02 solutions #2078
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
|
@DaleStudy 리뷰해줘요 |
|
이 PR은 4문제 모두 깔끔하게 해결했으며, 효율적 알고리즘을 적용하셨습니다. 특히 |
| nums.sort((a, b) => a - b); | ||
|
|
||
| for (let i = 0; i < nums.length - 2; i++) { | ||
| if (i && nums[i] === nums[i - 1]) { |
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.
i가 true라는건 0보다 클 때를 칭하는것이죠?!
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.
넵 0은 falsy니까 명시하지 않고 i만 적었습니다!
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.
리뷰남겨 주셔서 감사합니다!!!!
|
|
||
| const nums = [-1, 0, 1, 2, -1, -4]; | ||
| threeSum(nums); | ||
|
|
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.
저는 set으로 해서 연산이 오래걸린던데 투포인터로 변경해봐야겠네요! 👍
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!