You are viewing a single comment's thread. Return to all comments →
Brute force (java):
public static int maximizingXor(int l, int r) { int max = 0; for(int i = l; i < r; i++) { int xored = i ^ (i + 1); if(xored > max) { max = xored; } } return max; }
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 →
Brute force (java):