Easy C++ Solution Beats 100% ❤️‍🔥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minFlips(int a, int b, int c) {\n        int flips = 0;\n        while (a > 0 || b > 0 || c > 0) {\n            int bitA = a & 1;\n            int bitB = b & 1;\n            int bitC = c & 1;\n\n            if (bitC == 0) {\n                flips += (bitA + bitB); \n            } else {\n                if (bitA == 0 && bitB == 0) {\n                    flips += 1; \n                }\n            }\n\n            a >>= 1;\n            b >>= 1;\n            c >>= 1;\n        }\n\n        return flips;\n    }\n};\n```
['Bit Manipulation', 'Python', 'C++', 'Java']