Search
⌘K
Get Premium
Leetcode 2313. Minimum Flips in Binary Tree to Get Result
Given a binary tree that encodes a boolean expression (leaves are 0/1 and internal nodes are AND/OR gates, with some gates allowed to be changed), find the minimum number of flips — toggling leaf values or changing gate types where permitted — required so the root evaluates to a specified target value. Core challenge: combine gate semantics and flip options bottom-up to compute the minimal flips for each subtree.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.