Skip to content

[sun] W1 Solutions #315

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

Merged
merged 8 commits into from
Aug 17, 2024
Merged

[sun] W1 Solutions #315

merged 8 commits into from
Aug 17, 2024

Conversation

sun912
Copy link
Contributor

@sun912 sun912 commented Aug 12, 2024

  • contains-duplicate
  • number-of-1-bits
  • Top K Frequent Elements
  • Kth Smallest Element In a Bst
  • Palindromic Substrings

@sun912 sun912 marked this pull request as draft August 12, 2024 12:32
@sun912 sun912 requested a review from a team August 12, 2024 13:14
Copy link
Member

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

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

힘내세용 :)

result += n % 2
n = n//2

return result
Copy link
Member

Choose a reason for hiding this comment

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

옷, 파일 마지막에 line break가 빠져있네요.
참고: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오이잇 감사합니다~=)

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가 빠져있네요. 참고: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

저는 Python 컨벤션으로 알고 있었는데, 근본의 UNIX 기원이군요 감사합니다

@sun912 sun912 requested review from 0-Chan and naringst and removed request for 0-Chan August 16, 2024 03:28
@sun912 sun912 marked this pull request as ready for review August 16, 2024 03:29
@sun912 sun912 requested a review from DaleSeo August 16, 2024 03:29
result += n % 2
n = n//2

return result
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가 빠져있네요. 참고: https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

저는 Python 컨벤션으로 알고 있었는데, 근본의 UNIX 기원이군요 감사합니다

Comment on lines +23 to +24
if len(result) == k:
return result
Copy link
Contributor

Choose a reason for hiding this comment

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

early return으로 실행 속도 이득을 보는 것도 좋지만, 함수 시그니처에 맞춰서 return을 보장해주는 것도 좋다고 생각합니다

@taekwon-dev taekwon-dev added the py label Aug 17, 2024
@sun912 sun912 merged commit da7971f 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.

4 participants