563
-
[LeetCode] 563. Binary Tree TiltLeetCode 2021. 12. 8. 11:47
https://leetcode.com/problems/binary-tree-tilt/ Binary Tree Tilt - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Binary Tree Tilt - Easy binary tree에서 각각의 노드의 tilt의 합을 구하는 문제다. 노드의 tilt란 왼쪽 모든 하위노드들의 합과 오른쪽 모든 하위노드들의 합의 차이를 의미한다. 먼저 최하위 노드로 가서 결과값에 0을 더해준다. (최하위는 자식노드들이 없으므로) 그 다..