You are viewing a single comment's thread. Return to all comments →
Here is my easy and straitghforward solution, you can watch video here : https://youtu.be/pCU8W_ofvDg
int maximizingXor(int l, int r) { int result = 0; for(int a = l; a <= r; a++){ for(int b = a; b<= r; b++){ result = max(result, a ^ b); } } return result; }
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 →
Here is my easy and straitghforward solution, you can watch video here : https://youtu.be/pCU8W_ofvDg