You are viewing a single comment's thread. Return to all comments →
any one explain why this code works always int bitwiseAnd(int n, int k) { if (((k - 1) | k) <= n) { return k - 1; } else { return k - 2; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 29: Bitwise AND
You are viewing a single comment's thread. Return to all comments →
any one explain why this code works always int bitwiseAnd(int n, int k) { if (((k - 1) | k) <= n) { return k - 1; } else { return k - 2; } }