Last active
August 29, 2015 14:04
-
-
Save hilda8519/7caabe3c452880df7b59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Q55{ | |
public static void main(String[] args){ | |
int test1= 0b100111010110; | |
int test2= 0b011001000101; | |
System.out.println(numberOfCovert(test1,test2)); | |
} | |
static int bitSwapRequired(int a, int b){ | |
int count=0; | |
int c=a^b; | |
for(c=!0;c=>1){ | |
if(count=c&1){ | |
count++; | |
} | |
} | |
return count; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment