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

[kayden] Week 07 Solutions #487

Merged
merged 7 commits into from
Sep 27, 2024
Merged

[kayden] Week 07 Solutions #487

merged 7 commits into from
Sep 27, 2024

Conversation

kjb512
Copy link
Contributor

@kjb512 kjb512 commented Sep 23, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@kjb512 kjb512 self-assigned this Sep 23, 2024
@kjb512 kjb512 requested a review from obzva September 23, 2024 05:44
* }
*/
// 시간복잡도: O(N)
// 공간복잡도: 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.

반복문 내에서 새로운 ListNode를 만들어내기 때문에 공간 복잡도 또한 N에 비례하여 선형적으로 증가할 것 같습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

답변 감사합니다! 최적화해서 수정 했습니다!

@kjb512 kjb512 marked this pull request as ready for review September 25, 2024 19:15
@kjb512 kjb512 requested a review from a team as a code owner September 25, 2024 19:15
Copy link
Contributor

@obzva obzva left a comment

Choose a reason for hiding this comment

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

이번 한 주도 고생 많으셨습니다!
풀이가 깔끔하고 복잡도 분석도 코멘트 남길만한 게 없었습니다 :) Set Matrix Zeros는 공간 복잡도를 O(1)으로 푸는 방법이 있으니 일독 추천드립니다

Comment on lines +11 to +15
dp = [1] * n

for _ in range(1, m):
for j in range(1, n):
dp[j] = dp[j-1] + dp[j]
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

@bky373 bky373 Sep 26, 2024

Choose a reason for hiding this comment

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

오 그렇네요 좋은 풀이 감사합니다!

Copy link
Contributor

@bky373 bky373 left a comment

Choose a reason for hiding this comment

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

고생 하셨습니다~! 풀이해주신 것 보고 배웠습니다!

Comment on lines +11 to +15
dp = [1] * n

for _ in range(1, m):
for j in range(1, n):
dp[j] = dp[j-1] + dp[j]
Copy link
Contributor

@bky373 bky373 Sep 26, 2024

Choose a reason for hiding this comment

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

오 그렇네요 좋은 풀이 감사합니다!

@kjb512 kjb512 merged commit 72015a4 into DaleStudy:main Sep 27, 2024
1 check passed
@kjb512 kjb512 mentioned this pull request Sep 27, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants