/** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Right *TreeNode * } */funcsumOfLeftLeaves(root *TreeNode) int {if root ==nil {return0 }if root.Left !=nil&& root.Left.Left ==nil&& root.Left.Right ==nil {return root.Left.Val +sumOfLeftLeaves(root.Right) }returnsumOfLeftLeaves(root.Left) +sumOfLeftLeaves(root.Right)}