Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ count_number_of_one_bits.py
File
count_number_of_one_bits.py
bit_manipulation/count_number_of_one_bits.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
from
timeit
import
timeit
2
3
4
def
get_set_bits_count_using_brian_kernighans_algorithm(number: int) -> int:
Callers
nothing calls this directly
Calls
1
benchmark
Function · 0.70
Tested by
no test coverage detected