Skip to content
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

[bus710] Week 10 #1012

Merged
merged 1 commit into from
Feb 15, 2025
Merged

[bus710] Week 10 #1012

merged 1 commit into from
Feb 15, 2025

Conversation

bus710
Copy link
Contributor

@bus710 bus710 commented Feb 10, 2025

답안 제출 문제

체크 리스트

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

@bus710 bus710 requested a review from a team as a code owner February 10, 2025 04:09
@github-actions github-actions bot added the go label Feb 10, 2025
@bus710 bus710 requested a review from mmyeon February 10, 2025 04:10
@bus710
Copy link
Contributor Author

bus710 commented Feb 10, 2025

풀이 1
트리 문제라 조금 긴장 했지만 생각보다 간단하게 처리할 수 있었습니다... 후후후
공간복잡도는, 따로 생성한 것은 없지만, 주어진 트리가 있으니 O(n)
시간복잡도 또한 모든 잎을 방문해야 하기 때문에 O(n) 아닐까 생각 합니다.

Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

@bus710 님, 꾸준히 계속 참여해주셔서 감사합니다!
시간 복잡도와 공간 복잡도를 모두 O(n)으로 말씀해주셨는데, 내부적으로 노드를 새로 생성하는 등의 동작이 없으니 공간복잡도는 O(1)로 보셔도 무방하지 않을까요?
이런, 정작 작성하고 보니 재귀스택을 잊었네요!

invert-binary-tree/bus710.go Show resolved Hide resolved
@bus710 bus710 merged commit 1a97465 into DaleStudy:main Feb 15, 2025
3 checks passed
@bus710 bus710 deleted the week10 branch February 15, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants