-
Notifications
You must be signed in to change notification settings - Fork 126
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
[ganu] Week6 #886
[ganu] Week6 #886
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.
@gwbaik9717 님, 6주차도 고생하셨습니다~
매번 느끼지만 정말 깔끔한 풀이라서 리뷰할 부분이 거의 없네요 👍
복잡도에 대한 질문이 하나 있지만, 우선 승인 드리겠습니다!
@@ -0,0 +1,52 @@ | |||
// n: height of matrix, m: width of matrix | |||
// Time complexity: O(n*m) | |||
// Space complexity: O(n+m) |
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.
혹시 공간복잡도를 이렇게 판단하신 이유가 있으실까요?
answer
배열을 포함하셨다면 O(n*m)
이 되어야 할 것 같고, 제외한다면 O(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.
말씀해주신 것처럼 answer
배열을 포함을 해서 O(n*m)
으로 판단하였습니다! 어디까지 공간 복잡도로 포함시켜야할지 기준이 약간 모호하다 느껴서요, 현재 저는 input 을 제외한 나머지를 모두 공간 복잡도에 포함시키고 있습니다.
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.
아하 그렇다면 Space complexity를 O(n+m)
로 기입해주신 부분은 오타일까요..?!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.