You are viewing a single comment's thread. Return to all comments →
2 line Java hackish solution:
public static long flippingBits(long n) { long maxLong = 4294967295L; return -1 * (~n ^ maxLong) - 1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Flipping bits
You are viewing a single comment's thread. Return to all comments →
2 line Java hackish solution: