Skip to content

[bky373] Week 6 Solutions #121

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 1 commit into from
Jun 12, 2024
Merged

[bky373] Week 6 Solutions #121

merged 1 commit into from
Jun 12, 2024

Conversation

Copy link
Contributor

Choose a reason for hiding this comment

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


find-minimum-in-rotated-sorted-array 문제를 통해 만든
min 값 찾는 로직을 사용해서 푸셨군요

search-in-rotated-sorted-array/dev-jonghoonpark.md
저는 그냥 아예 새로 작성했는데 논리가 분리되는 면에서는 작성해주신 코드도 재밌네요 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dev-jonghoonpark
오 이렇게 풀 수도 있군요.. 빠르기도 하고 함수도 덜 사용하여 좋은 풀이법 같습니다! 공유해주셔서 감사합니다!

int max = 0;
while (left < right) {
int area = (right - left) * Math.min(height[left], height[right]);
if (area > max) {
Copy link
Contributor

Choose a reason for hiding this comment

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

요 부분을

max = Math.max(max, area)

요렇게 고치는걷 괜찮아 보이네요!

Copy link
Contributor Author

@bky373 bky373 Jun 9, 2024

Choose a reason for hiding this comment

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

네네 그렇네요 한 줄 줄이는 것도 가독성 측면에서 좋은 것 같습니다 의견 감사합니다!

Copy link
Contributor

@Invidam Invidam left a comment

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.

이 문제는 지독히 안 풀리는 문제 중 하나네요.. ㅠㅠ 역시 세상엔 고수가 많은 것 같습니다

@DaleSeo DaleSeo merged commit bcb2945 into DaleStudy:main Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants