You are viewing a single comment's thread. Return to all comments →
public static int bitwiseAnd(int N, int K) { int max = Integer.MIN_VALUE; for(int i=1;i<=N;i++){ for(int j=i+1;j<=N;j++){ int result = i&j; if(result < K && result > max) { max = result; } } } return max; }
Day 29: Bitwise AND
You are viewing a single comment's thread. Return to all comments →