You are viewing a single comment's thread. Return to all comments →
JavaScript
let max_value = 0; for(let i = l; i <= r; i++) { for(let j = i; j <= r; j++) { const v = i ^ j; if(max_value < v) { max_value = v; } } } return max_value;
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →
JavaScript