Open
Conversation
whdgns5059
reviewed
Jul 7, 2020
week1/2. K번째 수/Solution.java
Outdated
Collaborator
There was a problem hiding this comment.
만들어질 배열의 길이를 알 수 있는데 List를 사용할 필요가 있을까요
week1/2. K번째 수/Solution.java
Outdated
Collaborator
There was a problem hiding this comment.
List를 배열로 만들기 위해 stream api를 거치는 것 보다 toArrray() 메서드를 이용하는게 좋을것 같습니다.
내부에서 mapToInt 내에서 아무 로직도 수행하지 않는데 굳이 필요 할까요?
만약 위에서 길이가 정해진 배열을 만들었다면 List를 배열로 다시 만들 필요가 없을 것 입니다.
week1/2. K번째 수/solution.js
Outdated
Collaborator
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.
1-2 k번쨰 수 문제 풀이.
기존 체이닝 메서드 말고 한번 그냥 구현하는 방식으로 연습을 해보는 것도 필요할 것 같음.