Given two integers A & B. Determine how many bits required to convert A to B. Write a function
int BitSwapReqd(int A, int B);
x = A^B
count set bits in x, those are the number of bit to be swapped to convert from A to B
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks