Skip to content

[thispath98] Week 11 #1041

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 4 commits into from
Feb 22, 2025
Merged

[thispath98] Week 11 #1041

merged 4 commits into from
Feb 22, 2025

Conversation

thispath98
Copy link
Contributor

@thispath98 thispath98 commented Feb 20, 2025

답안 제출 문제

체크 리스트

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

@thispath98 thispath98 requested a review from a team as a code owner February 20, 2025 07:34
@github-actions github-actions bot added the py label Feb 20, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

공간 복잡도를 answer 변수 사용으로 O(1) 으로 잡아주셨는데, 해당 문제 풀이를 DFS 를 사용하셔서 제 생각에는 DFS의 호출에 따라 그만큼 스택이 쌓여서 Tree의 높이인 h만큼이 소요되여 O(h)가 될 것 같습니다. 한번 더 확인 해주시면 감사하겠습니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

재귀 호출 스택도 공간 복잡도에 포함시켜야 하는군요. 감사합니다!

Copy link
Contributor

Choose a reason for hiding this comment

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

nodes 배열에 모든 노드를 담아 O(n) 으로 풀이해 주셨네요!
해당 문제의 경우 LinkedList의 특성을 활용하는 문제로 O(1) 의 공간 복잡도로 문제 풀이가 가능하실 것 같습니다.

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.

11주차 문제 풀이 고생 많으셨습니다!
Reorder List의 경우 LinkedList의 특성을 잘 활용해야 하는 문제이기 때문에 복잡할 수 있지만 그만큼 이해도를 높이는게 중요한 문제가 될 것 같습니다.
다시 한번 풀이 및 찾아보시길 추천드립니다!
12주차 문제 풀이도 파이팅입니다!

@TonyKim9401 TonyKim9401 merged commit 6d14b8d into DaleStudy:main Feb 22, 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.

2 participants