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