Math . min ( a , b ) returns minimum of a and b return minimum number of flips till that digit
minXor = min ( minXor , countones ( temp ) ) NEW_LINE n -= 1 NEW_LINE mask = ( mask | ( 1 << n - 1 ) ) NEW_LINE return minXor NEW_LINE