Merged
Conversation
DaleSeo
reviewed
Oct 29, 2024
Comment on lines
+8
to
+9
| if (p == null && q == null) return true; | ||
| return false; |
Member
There was a problem hiding this comment.
😉
Suggested change
| if (p == null && q == null) return true; | |
| return false; | |
| return p == null && q == null; |
Contributor
There was a problem hiding this comment.
L7 ~ L10 을 조금 더 줄여서 아래처럼 가능할 것 같습니다!
if (p == null || q == null) {
return p == q;
}
SamTheKorean
approved these changes
Nov 3, 2024
Contributor
SamTheKorean
left a comment
There was a problem hiding this comment.
전반적으로 코드가 읽기 편해서 알고리즘을 이해하기 편했습니다! 고생많으셨습니다!
bky373
approved these changes
Nov 3, 2024
Contributor
bky373
left a comment
There was a problem hiding this comment.
정말 깔끔하게 풀어주셔서 코멘트 드릴 부분이 크게 없었네요!
한 주 동안 고생 많으셨습니다!
Comment on lines
+20
to
+21
| if (currentEnd >= nextStart) { | ||
| currentInterval[1] = Math.max(currentEnd, nextEnd); |
Contributor
There was a problem hiding this comment.
(사소) 이 조건이면 max 로 하지 않고, currentInterval[1] = currentEnd 로 해도 괜찮아 보입니다!
Contributor
There was a problem hiding this comment.
아앗 nextStart 와 nextEnd 를 잘못 봤군요 위 내용은 넘어가시면 될 것 같습니다!
bky373
reviewed
Nov 3, 2024
| @@ -0,0 +1,17 @@ | |||
| // TC: O(n) | |||
| // retreive all given nodes | |||
| // SC: O(1) | |||
Contributor
There was a problem hiding this comment.
dfs 스택을 사용하는 만큼 O(N) 이지 않을까요~?
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로 설정해주세요.