-
-
Notifications
You must be signed in to change notification settings - Fork 195
[Leo] 3rd Week solutions #74
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
return solve(root, subRoot) | ||
|
||
## TC: O(mn), where m and n denote len(subroot) and len(root) | ||
## SC: O(m+n) |
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 solve(root, subRoot) | ||
|
||
## TC: O(mn), where m and n denote len(subroot) and len(root) |
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.
@leokim0922 님은 잘 하시니, 시간 복잡도를
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.
이게 시간 복잡도 O(m+n)도 가능한 줄 몰랐네요. 아직 갈 길이 멀군요.
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.
Hint: 어떻게 하면 subRoot
를 대상으로 중복 순회하는 것을 방지할 수 있을까? 🧠
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.
흠 이미 방문한 node를 visited 처리해서 안돌면 될거같은데 고민을 좀 해봐야할거같네요 😓
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.
피드백 반영해주셔서 감사합니다. @leokim0922 님은 머지 권한이 있으시니 직접 하시길 바랍니다.
No description provided.