← ALL NOTES
Bit Manipulation

1318. Minimum Flips to Make a OR b Equal to c

Given a, b, c, each flip toggles one bit of a or b; find the minimum flips so (a OR b) == c bitwise. Bits are independent, so process each position on its own and sum the costs.

Loading…