C++ simple explained solution 0 ms, faster than 100%
Like it? please upvote...\n\nclass Solution {\npublic:\n    int minFlips(int a, int b, int c) {\n        int count = 0;\n        while (a | b != c)\n        {\n
**Like it? please upvote...**\n```\nclass Solution {\npublic:\n    int minFlips(int a, int b, int c) {\n        int count = 0;\n        while (a | b != c)\n        {\n            // get left bits of each number\n            int aa = a & 0x1;\n            int bb = b & 0x1;\n            int cc = c & 0x1;\n            if (cc == 0) // if left bit of c is zero - both a and b have to be zero\n            {\n                if (aa == 1) {count++; a--;}\n                if (bb == 1) {count++; b--;}\n            }\n            else // if left bit of c is one, either a or b have to be one\n                if ((aa == 0) && (bb == 0)) {count++; a += 1;}\n            a = a>>1;\n            b = b>>1;\n            c = c>>1;\n        }\n        return count;\n    }\n};\n```
[]