MCPcopy 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

1from timeit import timeit
2
3
4def get_set_bits_count_using_brian_kernighans_algorithm(number: int) -> int:

Callers

nothing calls this directly

Calls 1

benchmarkFunction · 0.70

Tested by

no test coverage detected