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

solved 트리의지름 - 112ms 9.9mb #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

euny0ung
Copy link
Member

💿 풀이 문제

#168

📝 풀이 후기

어려웠습니다. 아이디어는 맞았는데 어떻게 구현할지 생각하는게 어려웠어요

📚 문제 풀이 핵심 키워드

  • 루트노드에서 가장 먼 노드(깊이가 같다면 가중치가 가장 큰 노드)를 시작 노드로 잡고 시작 노드에서 가장 먼 노드까지의 길이가 답입니다. N크기가 커서 재귀로 dfs를 구현할 경우 시간초과가 날 수 있으므로 스택으로 구현했습니다.

🤔 리뷰로 궁금한 점

🧑‍💻 제출자 확인 사항

  • Convention(commit, pr 제목)이 올바른가요?
  • 괄호 내 안내문은 삭제하셨나요?
  • 본인의 체감 난도 Label을 등록했나요?
  • 제출자 확인 사항을 모두 확인하셨나요?

Sorry, something went wrong.

@euny0ung euny0ung added C++ C++로 풀이한 경우 선택합니다. Hard 책정 혹은 체감 난이도 어려움 시 선택합니다. labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ C++로 풀이한 경우 선택합니다. Hard 책정 혹은 체감 난이도 어려움 시 선택합니다.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant