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

[재호] WEEK 01 solutions #297

Merged
merged 5 commits into from
Aug 17, 2024
Merged

[재호] WEEK 01 solutions #297

merged 5 commits into from
Aug 17, 2024

Conversation

wogha95
Copy link
Contributor

@wogha95 wogha95 commented Aug 11, 2024

@wogha95 wogha95 marked this pull request as ready for review August 11, 2024 07:26
@wogha95 wogha95 marked this pull request as draft August 11, 2024 07:26
@dev-jonghoonpark
Copy link
Contributor

별건 아닌데 목록에 Top K Frequent Elements 문제가 2번 적혀있네요 ; )

@dev-jonghoonpark
Copy link
Contributor

PR 만드시고 나면 project 와 iterator 설정까지 부탁드립니다 : )
이번꺼는 제가 해두었습니다.

@wogha95 wogha95 added the js label Aug 16, 2024
@wogha95 wogha95 marked this pull request as ready for review August 16, 2024 11:47
* @return {number}
*/
var hammingWeight = function (n) {
return n
Copy link
Contributor

Choose a reason for hiding this comment

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

저는 hamming weight가 뭔지 몰랐는데, Brian Kernighan's Algorithm 라는 방법도 있더라고요 참고해보시면 도움되실 것 같습니다

Comment on lines +33 to +38
if (current.val >= 0) {
if (k === 1) {
result = current.val;
}
k -= 1;
}
Copy link
Contributor

@bky373 bky373 Aug 16, 2024

Choose a reason for hiding this comment

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

따로 리스트를 사용하지 않으신 부분이 인상 깊네요! 고생하셨습니다~ 👍

@yolophg yolophg merged commit 9b98f97 into DaleStudy:main Aug 17, 2024
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.

5 participants