Open
Conversation
rdd9223
approved these changes
Jan 27, 2026
Collaborator
rdd9223
left a comment
There was a problem hiding this comment.
고생하셨습니다! 구현 및 디테일에 다소 아쉬운 점이 있어요. 예외 케이스들도 통과할 수 있도록 다양한 값을 넣어서 시도해보시는 것을 추천드립니다.
| } | ||
| const l_sorted = quickSort(leftNums); | ||
| const r_sorted = quickSort(rightNums); | ||
| return [...l_sorted, pivot, ...r_sorted]; |
Collaborator
There was a problem hiding this comment.
"해당 배열을 수정하도록" 구현이 되어있어야 하는데, 새 배열을 생성하고 있어요. nums 자체를 sort하도록 수정해보세요. (재귀)
|
|
||
| */ | ||
| function selectSort(nums) { | ||
| n = nums.length; |
Collaborator
There was a problem hiding this comment.
let / const 키워드를 누락해서 전역변수로 취급됩니다. 이경우는 다른 함수에 영향을 줄 수 있어서 옳지 못한 코드로 보여요. 꼭 let 혹은 const로 선언 후에 사용해주세요.
Comment on lines
+210
to
+211
| leftIdx = 0; | ||
| rightIdx = 0; |
Collaborator
There was a problem hiding this comment.
선언만 하고 사용하지 않는 변수는 제거하는 것이 좋습니다.
| => O(n) | ||
|
|
||
| */ | ||
| function selectSort(nums) { |
Comment on lines
+223
to
+224
| const l_sorted = quickSort(leftNums); | ||
| const r_sorted = quickSort(rightNums); |
Collaborator
There was a problem hiding this comment.
snake_case로 통일하거나, camelCase로 통일해주세요.
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.
요구사항
기본
스크린샷
멘토에게