Skip to content

Commit dfab2ef

Browse files
committed
feat: add 0232 Number of 1 Bits solution
1 parent e9a35e3 commit dfab2ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

number-of-1-bits/hyogshin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def hammingWeight(self, n: int) -> int:
3+
return n.bit_count()

0 commit comments

Comments
 (0)