Skip to content

Commit 364fda0

Browse files
author
Openset
committed
Update: hammingWeight
1 parent 28a8db4 commit 364fda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

problems/number-of-1-bits/number_of_1_bits.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ func hammingWeight(num uint32) int {
44
num = (num & 0x55555555) + (num>>1)&0x55555555
55
num = (num & 0x33333333) + (num>>2)&0x33333333
66
num = (num & 0x0F0F0F0F) + (num>>4)&0x0F0F0F0F
7-
num = num * (0x01010101) >> 24
7+
num = (num * 0x01010101) >> 24
88
return int(num)
99
}

0 commit comments

Comments
 (0)