Search
⌘K

Leetcode 2236. Root Equals Sum of Children

Given a binary tree with exactly three nodes (a root and its left and right children), determine whether the root's value equals the sum of its two children's values. This is a constant-time check comparing root.val to left.val + right.val.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.