-
-
Notifications
You must be signed in to change notification settings - Fork 195
[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
[KwonNayeon] Week 7 #931
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
역시 파이썬..!
중요하지 않은 내용입니다.
혹시 내장 라이브러리를 사용하지 못하는 제한이 생긴다면 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HC-kang 님 꼼꼼한 리뷰 감사합니다! 저도 내장 라이브러리를 활용한 방법 말고 다른 방법도 찾아봐야지... 생각만 하고 있었는데, 리뷰 달아주셨으니 다른 방법도 꼭 찾아봐야겠어요 😂👍
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.