Skip to content

[Jeehay28] WEEK 08 #960

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

Merged
merged 5 commits into from
Jan 31, 2025
Merged

[Jeehay28] WEEK 08 #960

merged 5 commits into from
Jan 31, 2025

Conversation

Jeehay28
Copy link
Contributor

@Jeehay28 Jeehay28 commented Jan 27, 2025

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@Jeehay28 Jeehay28 requested a review from a team as a code owner January 27, 2025 06:25
@github-actions github-actions bot added the js label Jan 27, 2025
@Jeehay28 Jeehay28 requested a review from gwbaik9717 January 27, 2025 06:25
Copy link
Contributor

@TonyKim9401 TonyKim9401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7주차 문제 풀이 고생 많으셨습니다!
문제 접근 과정과 시도 흔적 및 개선을 너무 잘 정리해주셔서 감탄하며 리뷰 진행했습니다.
8주차 문제 풀이도 파이팅입니다!

Copy link
Contributor

@gwbaik9717 gwbaik9717 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요, @Jeehay28 님! 공유해주신 코드 잘 보았습니다. 하나의 문제를 다양한 접근으로 시도해보셨다는게 굉장히 인상적이었습니다. 몇 개 없지만 코멘트 남겨두었으니 확인부탁드립니다.

* @return {_Node}
*/

// BFS approach
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DFS 로 접근만 생각했었는데, BFS 접근도 신선하네요!

clones.set(node, clone);
let queue = [node];
while (queue.length > 0) {
node = queue.shift();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS 에서 shift 연산의 시간복잡도는 O(n) 입니다. 따라서 현재 BFS 로 풀었을 때 시간 복잡도는 O(N^2 + E) 가 될 것 같은데요, shift 연산을 최적화하기 위해 Queue 를 직접 구현해보시는 것을 어떠실까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아, 감사합니다. 시도해보겠습니다.

@Jeehay28 Jeehay28 merged commit 5714288 into DaleStudy:main Jan 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants