You are viewing a single comment's thread. Return to all comments →
My Python Solution:
def bitwiseAnd(N, K): ans = float("-INF") for i in range(1, N): for j in range(i + 1, N + 1): if (i & j) > ans and (i & j) < K: ans = i & j return ans
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 →
My Python Solution: