Merged
Conversation
dohyeon2
reviewed
Mar 12, 2026
Contributor
dohyeon2
left a comment
There was a problem hiding this comment.
전반적으로 풀이가 깔끔하네요
3Sum에 부르트포스 접근도 과정이 보여서 흥미롭게 봤습니다.
TC, SC 분석도 함께 남기면 더 공부가 될것같습니다!
3Sum의 새로운 답이 통과 된 이유도 명확해질것같아요.
| return dfs(node.left, min, node.val) && dfs(node.right, node.val, max); | ||
| } | ||
|
|
||
| return dfs(root, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY); |
Contributor
There was a problem hiding this comment.
Number에 이런 상수가 있는걸 이제 알았네요
배워갑니다~
Cyjin-jani
approved these changes
Mar 13, 2026
Comment on lines
+14
to
+18
| // const hasArray = result.some( | ||
| // (item) => | ||
| // JSON.stringify([...item].sort((a, b) => a - b)) === | ||
| // JSON.stringify([nums[i], nums[j], nums[k]].sort((a, b) => a - b)), | ||
| // ); |
Contributor
There was a problem hiding this comment.
오.. 이렇게 중복확인을 할 수도 있겠네요..! 아이디어 얻어갑니다ㅎㅎ
Contributor
Author
There was a problem hiding this comment.
비록 시간복잡도에서 타임 리밋 걸리긴했지만 저런 방법도 있었습니다
Comment on lines
+61
to
+69
| threeSum([ | ||
| 12, 5, -12, 4, -11, 11, 2, 7, 2, -5, -14, -3, -3, 3, 2, -10, 9, -15, 2, 14, | ||
| -3, -15, -3, -14, -1, -7, 11, -4, -11, 12, -15, -14, 2, 10, -2, -1, 6, 7, 13, | ||
| -15, -13, 6, -10, -9, -14, 7, -12, 3, -1, 5, 2, 11, 6, 14, 12, -10, 14, 0, -7, | ||
| 11, -10, -7, 4, -1, -12, -13, 13, 1, 9, 3, 1, 3, -5, 6, 9, -4, -2, 5, 14, 12, | ||
| -5, -6, 1, 8, -15, -10, 5, -15, -2, 5, 3, 3, 13, -8, -13, 8, -5, 8, -6, 11, | ||
| -12, 3, 0, -2, -6, -14, 2, 0, 6, 1, -11, 9, 2, -3, -6, 3, 3, -15, -5, -14, 5, | ||
| 13, -4, -4, -10, -10, 11, | ||
| ]); // [[-15,1,14],[-15,2,13],[-15,3,12],[-15,4,11],[-15,5,10],[-15,6,9],[-15,7,8],[-14,0,14],[-14,1,13],[-14,2,12],[-14,3,11],[-14,4,10],[-14,5,9],[-14,6,8],[-14,7,7],[-13,-1,14],[-13,0,13],[-13,1,12],[-13,2,11],[-13,3,10],[-13,4,9],[-13,5,8],[-13,6,7],[-12,-2,14],[-12,-1,13],[-12,0,12],[-12,1,11],[-12,2,10],[-12,3,9],[-12,4,8],[-12,5,7],[-12,6,6],[-11,-3,14],[-11,-2,13],[-11,-1,12],[-11,0,11],[-11,1,10],[-11,2,9],[-11,3,8],[-11,4,7],[-11,5,6],[-10,-4,14],[-10,-3,13],[-10,-2,12],[-10,-1,11],[-10,0,10],[-10,1,9],[-10,2,8],[-10,3,7],[-10,4,6],[-10,5,5],[-9,-5,14],[-9,-4,13],[-9,-3,12],[-9,-2,11],[-9,-1,10],[-9,0,9],[-9,1,8],[-9,2,7],[-9,3,6],[-9,4,5],[-8,-6,14],[-8,-5,13],[-8,-4,12],[-8,-3,11],[-8,-2,10],[-8,-1,9],[-8,0,8],[-8,1,7],[-8,2,6],[-8,3,5],[-8,4,4],[-7,-7,14],[-7,-6,13],[-7,-5,12],[-7,-4,11],[-7,-3,10],[-7,-2,9],[-7,-1,8],[-7,0,7],[-7,1,6],[-7,2,5],[-7,3,4],[-6,-6,12],[-6,-5,11],[-6,-4,10],[-6,-3,9],[-6,-2,8],[-6,-1,7],[-6,0,6],[-6,1,5],[-6,2,4],[-6,3,3],[-5,-5,10],[-5,-4,9],[-5,-3,8... |
Contributor
Author
There was a problem hiding this comment.
릿코드 테스트 케이스 복사해왔습니다 ㅋㅋ
| @@ -0,0 +1,26 @@ | |||
| function isAnagram(s: string, t: string): boolean { | |||
| if (s.length !== t.length) return false; | |||
Comment on lines
+15
to
+19
| for (const value in list) { | ||
| if (list[value] > 0) { | ||
| return false; | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
이미 충분히 괜찮은 방법입니다만, 3번째 for문을 없애고 조금 더 빠르게 만들 수 있을 듯 합니다!🤔
이미 s와 t의 길이가 같다보니 아래처럼 t의 문자가 list에 없거나 값이 이미 0인 경우 바로 false를 반환하도록 수정할 수도 있을 것 같아요..!
for (const key of t) {
if (!list[key]) {
return false;
}
list[key] -= 1;
}
Contributor
Author
There was a problem hiding this comment.
오.. 생각해보지 못했는데, 좋은 방법이네요
한번 돌려봐야겠어요!! 좋은 의견 너무 감사합니다~
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 하나 이상을 반드시 검토를 해주셔야 합니다!