Convert Binary Tree to Logical AND Tree
Given a binary tree, convert it so that every parent node holds the logical AND of its children's values. Leaf nodes may be edited as needed to satisfy this property. Return the modified tree.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late September, 2024
Meta
Senior
Convert a given binary tree to a tree that holds a logical AND property. Given a leaf node that can be edited, ensure the parent is a logical AND.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.