-
-
Notifications
You must be signed in to change notification settings - Fork 304
[hongseoupyun] WEEK 03 Solutions #2101
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
…ach and complexity in python
…d comments on complexity
seungriyou
left a comment
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.
이번 한 주도 고생 많으셨습니다~!
|
|
||
| while left < right: | ||
| if not s[left].isalnum(): | ||
| left+=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.
이렇게 two pointer를 사용한다면 공간 복잡도를 O(1)으로 최적화 할 수 있네요! 덕분에 좋은 풀이법 알아갑니다 ><
| continue | ||
| if not s[right].isalnum(): | ||
| right-=1 | ||
| continue |
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.
이렇게 if-continue 문 대신 내부에서 다시 while 문으로 left < right 범위 내에서 left / right 포인터를 이동시킨다면 더 간결한 코드가 될 것 같아요!
…etailed comments on approach and complexity
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!