Microsoft Interview Question

Find the number of '0' bits in an integer.

Interview Answer

Anonymous

Sep 2, 2015

If you can use in built libraries, you use this function public int zerobits(int num) { return Integer.toBinaryString(num).length()-Integer.bitCount(num); }