Simple Java Solution - runtime beats 100% and memory beats 80%
\n# Approach\nJava Solution using bit shift operation\n# Complexity\n- Time complexity: O(log(max(a,b,c)))\n- Space complexity: O(1)\n\n# Code\n\nclass Solution
\n# Approach\nJava Solution using bit shift operation\n# Complexity\n- Time complexity: O(log(max(a,b,c)))\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\n    public int minFlips(int a, int b, int c) {\n        int count = 0;\n        while(a>0 || b>0 || c>0) {\n            if((c&1)!=((a|b)&1)) {\n                if((c&1)==1) {\n                    count++;\n                } else {\n                    count = count + (a&1) + (b&1);\n                }\n            }\n            a=a>>1;\n            b=b>>1;\n            c=c>>1;\n        }\n        return count;\n    }\n}\n```
['Java']