You are viewing a single comment's thread. Return to all comments →
function getMaxLessThanK(n, k) { let max=0; for(let a = 1; a <= n; a++) for(let b = a + 1; b <= n; b++) { let x = a & b; if (max < x && x < k) max = x; } return max; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Bitwise Operators
You are viewing a single comment's thread. Return to all comments →