-
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
[jungsiroo] Week 7 #925
[jungsiroo] Week 7 #925
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.
@jungsiroo 님, 이번주도 고생하셨습니다~!
앞으로도 좋은 풀이 많이 올려주시면 좋겠네요!!
hash_map[ch] = end | ||
answer = max(answer, end-begin+1) | ||
else: | ||
if begin<=hash_map[ch]<end: #중복이 생겼다. |
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.
< end
조건은 불필요해 보이는데 혹시 필요한 상황이 있을까요?
중복이 발생하고 begin과 end사이라면 중복 발생 원인 다음을 begin으로 세팅 후 다시 계산 | ||
|
||
Time Complexity : O(n) | ||
Space Complexity : O(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.
이번에 리뷰하면서 문제를 다시 읽어봤는데, s
의 길이와 더불어 카디널리티 조건도 있는것 같아요.
symbols가 과연 어디까지 나타내는걸까 싶기는 한데, 결과적으로 상수값이 되어 O(1)
라고도 할 수 있지 않을까 싶네요
- 문제의 조건:
s
consists of English letters, digits, symbols and spaces.
SC : O(1) | ||
""" | ||
|
||
return comb(m+n-2, m-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.
역시 파이썬의 편의성 최고네요 👍
matrix[i][j] = 0 | ||
""" | ||
|
||
# Constant Space Complexity using bitmasking |
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.
와우,, 파이썬은 200비트 정수를 사용할수 있네요
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.