Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Binary Count by Moff
function binaryCount(n) {
let result = 0;
while (n) {
result += n & 1;
// n >>= 1;
n = Math.floor(n / 2);
}
return result;
}
July 31, 2017