-
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
[EGON] Week 4 Solutions #433
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.
수고하셨습니다! 복잡도 관련해서 질문이 있지만 승인하는데는 문제가 없을 것 같습니다.
def solveWithPointer(self, s: str) -> bool: | ||
trimmed_s = "" | ||
for char in s: | ||
if char.isalpha() or char.isnumeric(): |
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.
FYI
if char.isalpha() or char.isnumeric(): | |
if char.isalnum(): |
Runtime: 5005 ms (Beats 27.48%) | ||
Time Complexity: O((MAX_R ** 2) * (MAX_C ** 2)), upper bound | ||
- 이중 for문 조회에 O(MAX_R * MAX_C) | ||
- node 하나당 조회하는 DIRS의 크기가 4이고, 최대 word의 길이만큼 반복하므로 O(4 * L) |
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(4 * L)
에 대해서 다시 생각해보시겠어요? O(4^L)
이 되지 않을까요?
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.
풀이 좋습니다~~ 수고 많으셨습니다!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.