Skip to content

Commit eeefb09

Browse files
committed
Added Minimum Flips to Make a OR b Equal to c.java
1 parent 7cf26a8 commit eeefb09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)