Skip to content

Commit c1a902d

Browse files
iamAntimPalAntim-IWPIamShiwangi
committed
Update 338. Counting Bits.py
Co-Authored-By: Antim-IWP <203163676+Antim-IWP@users.noreply.github.com> Co-Authored-By: Shiwangi Srivastava <174641070+IamShiwangi@users.noreply.github.com>
1 parent d6ef177 commit c1a902d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def countBits(self, n: int) -> List[int]:
3+
return [i.bit_count() for i in range(n + 1)]

0 commit comments

Comments
 (0)