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 bdaf365 commit a6b8103Copy full SHA for a6b8103
java/2220-minimum-bit-flips-to-convert-number.java
@@ -0,0 +1,6 @@
1
+class Solution {
2
+ public int minBitFlips(int start, int goal) {
3
+ int xorResult = start ^ goal;
4
+ return Integer.bitCount(xorResult);
5
+ }
6
+}
0 commit comments