We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cf26a8 commit eeefb09Copy full SHA for eeefb09
Medium/Minimum Flips to Make a OR b Equal to c.java
@@ -0,0 +1,5 @@
1
+class Solution {
2
+ public int minFlips(int a, int b, int c) {
3
+ return Integer.bitCount((a | b) ^ c) + Integer.bitCount(a & b & ((a | b) ^ c));
4
+ }
5
+}
0 commit comments