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.
[pepper] Week 6 Solutions #479
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
[pepper] Week 6 Solutions #479
Changes from all commits
46d6fc9
b8fa39b
8a42f7d
f6cf44e
6e0e5b3
73a3a2d
28876ed
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
크 복잡한 조건이나 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.
Space complexity가 O(m*n)인 이유가 혹시
ans
배열 때문일까요?보통 return하는 정답 객체는 공간 복잡도에 포함시키지 않는 것으로 알고 있습니다 :)
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.
stack이 비어 있는 경우도 처리해주어야 하지 않나 싶었는데, JS에선 빈 배열을 pop할 때 undefined를 반환한다는 사실 덕분에 알아 갑니다 ㅎㅎ