Skip to content
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

[혜준] Week1 문제 풀이 #308

Merged
merged 5 commits into from
Aug 17, 2024
Merged

[혜준] Week1 문제 풀이 #308

merged 5 commits into from
Aug 17, 2024

Conversation

hyejjun
Copy link
Contributor

@hyejjun hyejjun commented Aug 12, 2024

@hyejjun hyejjun marked this pull request as draft August 12, 2024 06:45
@yolophg
Copy link
Contributor

yolophg commented Aug 12, 2024

안녕하세요, 코치 Helena 입니다.
아래 사진과 같이 Projects 에서 iteration 설정도 같이 부탁드립니다!
이번엔 제가 해두었는데, 원할한 스터디 그룹 진도 관리와 통계를 위해서 중요한 부분이니 다음 이터레이션부터는 해주시면 감사드리겠습니다 :)
Screenshot 2024-08-12 at 11 41 08

@hyejjun hyejjun added the js label Aug 16, 2024
@hyejjun hyejjun marked this pull request as ready for review August 16, 2024 10:32

const set = new Set(nums);

return nums.length !== set.size ? true : false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 간결한 풀이네요!
매우 사소한 의견이지만, 삼항 연산자를 사용하지 않아도 될 것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return nums.length !== set.size;

넵! 이해했습니다. 의견 감사합니다!

/*
Time Complexity : O(n^2)
Space Complexity: O(1)
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파일 마지막에 line break 추가 부탁드립니다!
사용하시는 에디터를 잘 모르지만, 에디터 설정에서 자동 적용 기능이 있는지 찾아보시면 좋을 것 같습니다!

let val = n.toString(2);

let res = 0;
[...val].forEach((val) => res += parseInt(val))
Copy link
Contributor

@HC-kang HC-kang Aug 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 @hyejjun 님!
해당 코드에서는 사용자가 직접 toString(2)로 2진수로 변환한 안전한 문자열이므로 parseInt(val)�은 굳이 사용하지 않아도 좋을 것 같습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네! 피드백 감사합니다!

@hyejjun hyejjun merged commit ca6a63c into DaleStudy:main Aug 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants