Leetcode 1318. Minimum Flips to Make a OR b Equal to c
Find the minimum number of single-bit flips in a and b required so that (a | b) == c. Each bit is independent: if c's bit is 1 you must ensure at least one of a/b is 1 (flip once if both 0); if c's bit is 0 you must flip every 1 in a or b at that position to 0.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.