README ¶ https://leetcode.cn/problems/sum-of-left-leaves/ 404. 左叶子之和 简单 给定二叉树的根节点 root ,返回所有左叶子之和。 示例 1: 输入: root = [3,9,20,null,null,15,7] 输出: 24 解释: 在这个二叉树中,有两个左叶子,分别是 9 和 15,所以返回 24 示例 2: 输入: root = [1] 输出: 0 提示: 节点数在 [1, 1000] 范围内 -1000 <= Node.val <= 1000 Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type TreeNode Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type TreeNode ¶ type TreeNode struct { Val int Left *TreeNode Right *TreeNode } * Definition for a binary tree node. type TreeNode struct { Val int Left *TreeNode Right *TreeNode } Source Files ¶ View all Source files sumOfLeftLeaves.go Click to show internal directories. Click to hide internal directories.