Commit Graph

2 Commits

Author SHA1 Message Date
JatinR05
bb078541dd
Update count_number_of_one_bits.py (#7589)
* Update count_number_of_one_bits.py

removed the modulo operator as it is very time consuming in comparison to the and operator

* Update count_number_of_one_bits.py

Updated with the timeit library to compare. Moreover I have updated my code which helps us in reaching the output comparatively faster.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update bit_manipulation/count_number_of_one_bits.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update count_number_of_one_bits.py

Updated the code

* Update count_number_of_one_bits.py

Updated code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Run the tests before running the benchmarks

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* consistently

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-10-24 12:13:39 +02:00
Ayush Bisht
d3ac521b63
add count_number_of_one_bits.py (#4195)
* count-bits

* update
2021-02-12 07:59:24 +05:30