Skip to content
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

Merged
merged 1 commit into from
Sep 8, 2024
Merged

Conversation

lymchgmk
Copy link
Contributor

@lymchgmk lymchgmk commented Sep 6, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@lymchgmk lymchgmk added the py label Sep 6, 2024
@lymchgmk lymchgmk requested a review from haklee September 6, 2024 15:30
@lymchgmk lymchgmk self-assigned this Sep 6, 2024
@lymchgmk lymchgmk requested a review from a team as a code owner September 6, 2024 15:30
Copy link
Contributor

@DaleSeo DaleSeo left a 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():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI

Suggested change
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)
Copy link
Contributor

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)이 되지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**의 오타인 것 같습니다 다음부터는 ^로 작성하도록 하겠습니다

Copy link
Contributor

@haklee haklee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

풀이 좋습니다~~ 수고 많으셨습니다!

@SamTheKorean SamTheKorean merged commit 92359ca into DaleStudy:main Sep 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants