404
-
[LeetCode] 404. Sum of Left LeavesLeetCode 2021. 11. 4. 11:56
https://leetcode.com/problems/sum-of-left-leaves/ Sum of Left Leaves - 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 Sum of Left Leaves - Easy 왼쪽 자식 중 leaf 노드 인 것들의 val만 더하는 문제다. 쭉 훑어주면서 leaf 인지 체크와 left 자식 노드인지 체크만 해주면 된다. 전체 풀이 코드 class Solution { public: int ret = 0; int sumOf..