Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 315 Bytes

Question_2236.md

File metadata and controls

14 lines (12 loc) · 315 Bytes

LeetCode Records - Question 2236 Root Equals Sum of Children

Attempt 1:

class Solution {
    public boolean checkTree(TreeNode root) {
        return root.left.val + root.right.val == root.val;
    }
}
  • Runtime: 0 ms (Beats: 100.00%)
  • Memory: 41.32 MB (Beats: 19.51%)