-
-
Notifications
You must be signed in to change notification settings - Fork 195
[Leo] 6th Week solutions + CONTRIBUTING.md update #119
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
Conversation
container-with-most-water/Leo.py
Outdated
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.
변수명이 알아보기 편한 것 같습니다!
|
||
return res | ||
|
||
## TC:O(n), SC:O(min(m,n)) where n is len(s) and m is size(seen) |
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(n) 으로 정리할 수 있을 것 같은데
특별히 m (size(seen)) 이라는 것을 추가로 고려하신 이유가 있으실까요?
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(n)이라 생각했는데요, 이번에 풀면서 생각해보니까 예를들어 알파벳이라고 가정했을 때 s의 길이는 이론적으로 10000개도 넣을 수 있겠지만, seen에 들어가는건 결국 알파벳 최대갯수를 넘어설 수 없고, 반대로 s가 26자보다 짧다면 그 길이만큼만 고려하면 된다고 생각했어요. 그래서 두 경우 중 min값을 가져가는게 좀더 디테일한 분석이 아닐까 생각해봤습니다 😄
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.
시간 복잡도 계산할 때 사용하는 빅 오 표기법에서는
계수와 낮은 차수의 항을 제외시키기 때문에 알파벳 최대 갯수 (26) 는 무시해도 되지 않을까 생각이 들긴 하네요
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.
오 잘 정리해주셔서 감사합니다!
CONTRIBUTING.md
Outdated
```md | ||
PR# | 작성자 | 타겟리뷰 | ||
|
||
PR3 - C : A의 코드 리뷰 | ||
PR2 - B : C의 코드 리뷰 | ||
PR1 - A : B의 코드 리뷰 | ||
``` |
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.
모든 문제에 대한 답안 코드를 한 번에 올리려고 하지 말고, Draft PR을 통해서 조금씩 나누어서 올리는 것을 권장하는 내용도 추가되면 좋을 것 같습니다.
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.
@DaleSeo 이미지추가 및 해당내용, Iteration 설정에 대한 내용까지 추가했습니다. 확인 부탁드릴게요!
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.
깔끔하게 솔루션 정리해주셨네요! 이번주도 고생 많으셨습니다. |
No description provided.