-
-
Notifications
You must be signed in to change notification settings - Fork 195
[taurus09318976.py] WEEK 06 Solutions #1448
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
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.
1주간 수고하셨습니다!
# tails의 길이가 최대 LIS 길이임 | ||
return len(tails) | ||
|
||
|
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 isValid(self, s: str): | ||
stack = [] | ||
# 닫는 괄호를 키로, 여는 괄호를 값으로 딕셔너리에 저장 | ||
pair = {')': '(', '}': '{', ']': '['} |
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.
짝이 되는 괄호를 미리 배열로 만들어 두어서 코드가 더 가독성이 더 높아지는 것 같네요
|
||
return dfs(self.root, 0) | ||
|
||
|
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.
역시 파이썬이 코드로 보기에는 java, c++ 보다 더 간결해서 코드 짜기가 수월하네요
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!