var evaluateTree = function(root) {
if (root === null) return false
if (root.val === 0) return false
if (root.val === 1) return true
let left = evaluateTree(root.left)
let right = evaluateTree(root.right)
return root.val === 2 ? left || right : left && right
};
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)