Last updated 4 months ago
Was this helpful?
🟩 Easy
My Solution
/** * 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) }
Leetcode: