You are viewing a single comment's thread. Return to all comments →
Nice solution. It can be written in one line:
System.out.println(Integer.highestOneBit(L ^ R) * 2 - 1);
Seems like cookies are disabled on this browser, please enable them to open this website
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
Nice solution. It can be written in one line: