1var hammingWeight = function (n) {2 let count = 0,3 i = 0;4 while (n > 0) {5 i = 0;6 while (n >= Math.pow(2, i)) {7 i++;8 }9 count++;10 n -= Math.pow(2, i - 1);11 }12 return count;13};
WPM •0 •0
ACC •0 •0
TIME •0