HTMLify
LeetCode - Root Equals Sum of Children - Go
Views: 322 | Author: abh
1 2 3 4 5 6 7 8 9 10 11 | /** * Definition for a binary tree node. * type TreeNode struct { * Val int * Left *TreeNode * Right *TreeNode * } */ func checkTree(root *TreeNode) bool { return root.Val == root.Left.Val + root.Right.Val } |