반응형
https://www.hackerrank.com/challenges/cut-the-tree/problem
Cut the Tree | HackerRank
Remove an edge from a tree such that the sum of the absolute difference between the value stored at each of the trees' vertices is minimal.
www.hackerrank.com
참고 : https://power-coding.tistory.com/7
[문제 풀이] Hacker Rank - Cut the Tree
HackerRank link Cut the Tree 풀이 핵심 node의 탐색 방법으로는 DFS를 이용. node를 탐색하면서 노드의 값을 더하면서 값을 계산함. 이 문제 에서 Java의 경우 input reference 코드의 퍼포먼스가 매우 안좋게..
power-coding.tistory.com
Cut the Tree / Medium / DFS
반응형
'캐나다 개발자' 카테고리의 다른 글
캐나다 밴쿠버 개발자의 오늘/나는 어떻게 어쩌다가 밴쿠버 캐나다에 오게 됐을까 (0) | 2023.02.10 |
---|---|
캐나다 밴쿠버 개발자의 오늘/01-10/2023 (0) | 2023.01.10 |
캐나다로 이민 온 한국 IT 개발자(Software Engineer) 캐나다 밴쿠버 해외 취업 / Senior Software Engineer in Canada (3) | 2022.08.12 |
시스템 디자인 인터뷰 (System Design) 준비 자료 (0) | 2022.02.14 |
인터뷰 참고자료 (0) | 2022.02.14 |