![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FHGAt7%2FbtrD7F3WwRt%2FtxaobtOujTdfX39kul5aW1%2Fimg.jpg)
문제 Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is the left child of another node. root이진 트리가 주어지면 모든 왼쪽 잎의 합을 반환합니다. 리프는 자식이 없는 노드입니다 . 왼쪽 리프 는 다른 노드의 왼쪽 자식인 리프입니다. 예시 Example 1: Input: root = [3,9,20,null,null,15,7] Output: 24 Explanation: There are two left leaves in the binary tree, with values 9 and 15 resp..
![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbgzENn%2FbtrD1flvSFz%2FIVnK2mf5jHmWbTYJUAhgPK%2Fimg.jpg)
문제 Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 이진 root트리의 최대 깊이를 반환합니다 . 이진 트리의 최대 깊이 는 루트 노드에서 가장 먼 잎 노드까지 가장 긴 경로를 따라 있는 노드의 수입니다. 예시 Example 1: Input: root = [3,9,20,null,null,15,7] Output: 3 Example 2: Input: root = [1,null,2] Output: 2 제약 조건 Constrain..
Comment