Search
⌘K

Leetcode 2331. Evaluate Boolean Binary Tree

Given a full binary tree where leaves are boolean constants (0 = False, 1 = True) and internal nodes are operators (2 = OR, 3 = AND), compute the boolean value of the root by recursively evaluating each node's children and applying its operator. This is essentially evaluating an expression tree (post-order traversal) on up to ~1000 nodes.


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.

Leetcode 2331. Evaluate Boolean Binary Tree | Hello Interview