You are viewing a single comment's thread. Return to all comments →
def bitwiseAnd(N, K): if (K - 1) | K <= N: return K - 1 return K - 2
the max value before k will be k-1 is it exists print k-1 else k-2 the next largest value before k-1
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 →
the max value before k will be k-1 is it exists print k-1 else k-2 the next largest value before k-1