We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8076db0 commit 3a7c42bCopy full SHA for 3a7c42b
number-of-1-bits/printjin-gmailcom.py
@@ -0,0 +1,3 @@
1
+class Solution:
2
+ def hammingWeight(self, n):
3
+ return bin(n).count('1')
0 commit comments