-
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
[jinah92] Week 2 #752
[jinah92] Week 2 #752
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.
2주차도 수고 많으셨습니다 시간복잡도와 공간복잡도 계산을 연습해보시면 도움이 되실 것 같습니다
char_set_1, char_set_2 = {}, {} | ||
|
||
for ch in s: | ||
char_set_1[ch] = 0 if ch not in char_set_1 else char_set_1[ch] + 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.
조건 표현식도 좋지만, 이렇게 긴 경우에는 .get 메서드의 기본값을 사용해보시면 가독성에 도움이 되실 것 같습니다.
@@ -0,0 +1,20 @@ | |||
# 공간복잡도 : O(1), 시간복잡도 : O(N^2) |
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.
three_sums의 크기 때문에 공간복잡도가 O(1) 보다 클 것 같습니다.
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.