Open
Conversation
nowrobin
approved these changes
Mar 7, 2026
nowrobin
left a comment
There was a problem hiding this comment.
문제풀이 고생하셨습니다. 비슷한 풀이인 문제들도 있었지만 다른 방식으로 푼것 보고 새롭게 느껴졌네요. 코멘트 남기부분은 가독성과 의도파악부분이라 참고만 해주시면 감사하겠습니다. 다음주도 화이팅입니다.
Comment on lines
+6
to
+12
| unq_nums.sort((a, b) => { | ||
| if (mp[a] === mp[b]) { | ||
| return 0; | ||
| } | ||
|
|
||
| return mp[a] < mp[b] ? 1 : -1; | ||
| }); |
There was a problem hiding this comment.
여기 부분을 unq_nums.sort((a, b) => mp[b] - mp[a]);
이런시으로 단순화 할수있을것 같습니다.
There was a problem hiding this comment.
l,r 같이 포인터를 이용해서 조합을 순회하는 방식으로 구현하신 것 같은데, 이런 구조를 선택하신 이유가 있을까요?
모든 쌍을 확인하는 문제라서 이중 for문이 의도를 파악하기에는 더 쉬울 것 같다는 생각이 들었습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!