Open github-actions[bot] opened 2 years ago
/*
* @lc app=leetcode id=191 lang=typescript
*
* [191] Number of 1 Bits
*/
// @lc code=start
function hammingWeight(n: number): number {
let count = 0;
while (n) {
if (n & 1) {
count++;
}
n = n >>> 1;
}
return count;
};
// @lc code=end
Nickname: Geeku From vscode-hzfe-algorithms
/*
* @lc app=leetcode id=191 lang=typescript
*
* [191] Number of 1 Bits
*/
// @lc code=start
function hammingWeight(n: number): number {
let count = 0;
while (n) {
if (n & 1) {
count++;
}
n = n >>> 1;
}
return count;
};
// @lc code=end
Nickname: Geeku From vscode-hzfe-algorithms