mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Fix issue #1152
This commit is contained in:
parent
ca3d16dcce
commit
7728ba4ec3
@ -11,7 +11,7 @@ export default function countSetBits(originalNumber) {
|
|||||||
setBitsCount += number & 1;
|
setBitsCount += number & 1;
|
||||||
|
|
||||||
// Shift number right by one bit to investigate other bits.
|
// Shift number right by one bit to investigate other bits.
|
||||||
number >>>= 1;
|
number >>= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return setBitsCount;
|
return setBitsCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user