Python shortest 1-liner. Bit manipulation. Functional programming.
Approach\n1. Given that c is the goal. And c\' = a | b is where we are at, we need to flip bits in a or b to make c\' == c.\n\n2. Every mismatched bit between c
# Approach\n1. Given that `c` is the goal. And `c\' = a | b` is where we are at, we need to flip bits in `a` or `b` to make `c\' == c`.\n\n2. Every mismatched bit between `c` and `c\'` is an indication that we need atleast one flip. Count number of such flips by taking `xor`, i.e `(c ^ c).bit_count()\'`\n\n3. But in a special case where a bit in `a, b, c` is `1, 1, 0` respectively, we need 2 flips. And step 2 only counts one such flip. To compensate that count of bits with the above pattern, i.e `(a & b & ~c).bit_count()`.\n\n4. Add both counts and return.\n\n# Complexity\n- Time complexity: $$O(n)$$\n\n- Space complexity: $$O(n)$$\n\nwhere, `n is the number of bits in max(a, b, c)`.\n\n# Code\n```python\nclass Solution:\n    def minFlips(self, a: int, b: int, c: int) -> int:\n        return ((a | b) ^ c).bit_count() + (a & b & ~c).bit_count()\n\n\n```
['Bit Manipulation', 'Python', 'Python3']