You are viewing a single comment's thread. Return to all comments →
int maximizingXor(int l, int r) { return (1 << int(log2(l ^ r) + 1)) - 1; }
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
Here is a one liner in C++