We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba888bd commit 653c04aCopy full SHA for 653c04a
solution/0191.Number of 1 Bits/Solution.py
@@ -0,0 +1,8 @@
1
+class Solution(object):
2
+ def hammingWeight(self, n):
3
+ """
4
+ :type n: int
5
+ :rtype: int
6
7
+
8
+ return bin(n).count("1")
0 commit comments