[krokerdile] WEEK 02 solutions#1225
Merged
krokerdile merged 6 commits intoDaleStudy:mainfrom Apr 14, 2025
Merged
Conversation
Member
|
@krokerdile 님, 프로젝트 주차 설정 좀 부탁드립니다. 디스코드에 응답이 없으셔서 PR에 코멘트도 남겨드립니다. |
Contributor
Author
죄송합니다, 방금 확인했네요! 주차별 설정 해뒀습니다. 해둔 줄 알고 깜박했네요😅 |
sora0319
reviewed
Apr 12, 2025
| # 오른쪽 서브트리는 최소값을 현재 노드 값으로 제한 | ||
| return validate(node.left, low, node.val) and validate(node.right, node.val, high) | ||
|
|
||
| return validate(root, float('-inf'), float('inf')) |
Contributor
There was a problem hiding this comment.
저는 자바로 해서 long을 사용했는데 파이썬에서는 float로 하군요!
혹시 파이썬에도 int 보다는 크고 float 보다는 작은 범위가 있나요?
그것이 있다면 그것으로 해도 될 듯 하네요
Comment on lines
+9
to
+11
| for i in range(len(s)): | ||
| a[s[i]] = a.get(s[i], 0) + 1 | ||
| b[t[i]] = b.get(t[i], 0) + 1 |
Contributor
There was a problem hiding this comment.
제가 파이썬을 하지 않아서 이 부분이 잘 이해가 가지 않는데 어떤 순서로 리스트에 넣는 건가요?
| else: | ||
| right -= 1 # 합이 크면 오른쪽을 왼쪽으로 | ||
|
|
||
| return result |
Contributor
There was a problem hiding this comment.
포인터를 사용해서 하셨군요!
여러가지 방법을 배웁니다
저도 이 방법으로 다시 풀어봐야 겠어요
혹시 2가지 방법 중 어떤 것이 속도가 더 빨랐나요?
sora0319
approved these changes
Apr 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!