Skip to content

[bky373] Week 6 Solutions#121

Merged
DaleSeo merged 1 commit intoDaleStudy:mainfrom
bky373:main
Jun 12, 2024
Merged

[bky373] Week 6 Solutions#121
DaleSeo merged 1 commit intoDaleStudy:mainfrom
bky373:main

Conversation

@bky373
Copy link
Copy Markdown
Contributor

@bky373 bky373 commented Jun 8, 2024

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

코드 깔끔하게 작성해주시는 게 대단하네요! 이번주도 수고하셨습니다 👍

Comment thread longest-substring-without-repeating-characters/bky373.java
Comment thread search-in-rotated-sorted-array/bky373.java
Copy link
Copy Markdown
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