We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 891ee93 commit c528fd2Copy full SHA for c528fd2
number-of-1-bits/samthekorean.py
@@ -1,4 +1,5 @@
1
-# TC : O(n)
+# TC : O(log n)
2
+# reason : bin method internally devides n by 2 while transitioning to binary number
3
# SC : O(1)
4
class Solution:
5
def hammingWeight(self, n: int) -> int:
0 commit comments