Skip to content

[KwonNayeon] Week 7 #931

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
Jan 25, 2025
Merged

[KwonNayeon] Week 7 #931

merged 8 commits into from
Jan 25, 2025

Conversation

KwonNayeon
Copy link
Contributor

@KwonNayeon KwonNayeon commented Jan 20, 2025

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@KwonNayeon KwonNayeon requested a review from a team as a code owner January 20, 2025 09:33
@github-actions github-actions bot added the py label Jan 20, 2025
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

안녕하세요 @KwonNayeon 님!
정말 깔끔하게 문제를 잘 풀어주셔서, 리뷰보다는 일거리를 더 드린것 같네요.. ㅎㅎ
우선 현재 코드도 충분히 좋은 코드이니 승인 드리겠습니다!

시간이 괜찮으시다면 한 계단씩만 더 올라보시는것도 좋을 것 같아요~ 💪

- 행렬 순회: O(m*n)
- 행과 열 변환: O(m*n)

Space Complexity: O(m+n)
Copy link
Contributor

Choose a reason for hiding this comment

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

공간복잡도를 개선하는 과정을 보여주시니 좋네요!
혹시 시간이 가능하시다면, 한번 O(1)까지 확보해 보시는것은 어떨까요?
이미 한단계 개선 스텝을 밟으셔서, 다음 스텝도 금방 찾으실수 있을 것 같아요!

약간의 힌트라면, 주어진 배열이 굳이 0 또는 1 말고 잠깐 다른 값을 가져도 문제가 될건 없겠죠?

class Solution:
def uniquePaths(self, m: int, n: int) -> int:
from math import comb
return comb(m+n-2, n-1)
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 Author

Choose a reason for hiding this comment

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

@HC-kang 님 꼼꼼한 리뷰 감사합니다! 저도 내장 라이브러리를 활용한 방법 말고 다른 방법도 찾아봐야지... 생각만 하고 있었는데, 리뷰 달아주셨으니 다른 방법도 꼭 찾아봐야겠어요 😂👍

@KwonNayeon KwonNayeon closed this Jan 25, 2025
@KwonNayeon KwonNayeon reopened this Jan 25, 2025
@KwonNayeon KwonNayeon merged commit 69f2017 into DaleStudy:main Jan 25, 2025
4 checks passed
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.

2 participants