Twitter Codility Problem – Max Binary Gap
Problem: Get maximum binary Gap. For example, 9’s binary form is 1001, the gap is 2. Java Solution 1 An integer x & 1 will get the last digit of the integer. public static int getGap(int N) { int max = 0; int count = -1; int r = 0; while (N > 0) … Read more