* use format to remove '0b'
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: error message for float input
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create find_previous_power_of_two.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update find_previous_power_of_two.py
This change avoids the unnecessary left shift operation
* Update find_previous_power_of_two.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* added excess-3 code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated with fixes
* updated with fixes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update excess_3_code.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create swap_all_odd_and_even_bits.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update swap_all_odd_and_even_bits.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* 6: 00000110 --> 9: 00001001
* Update swap_all_odd_and_even_bits.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* added decimal to bcd sequence
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated with fixes
* Update and rename bcd_sequence.py to binary_coded_decimal.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update binary_coded_decimal.py
* Update binary_coded_decimal.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix incorrect range detection in find_missing_number
* Support consecutive decreasing numbers
Added support for consecutive decreasing numbers in the find_missing_number function.
* Support unordered numbers
* added power_of_4
* updated power_of_4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated power_of_4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated power_of_4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated power_of_4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated power_of_4
* added type check
* added tescase
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added missing_number algorithm using bit manipulation
* Update bit_manipulation/missing_number.py
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* add is power of two
* fix comment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Deal with negative numbers
* Spelling: negative
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added algorithm for finding index of rightmost set bit
* applied suggested changes
* applied suggested changes
* Fixed failing Testcases
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* 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>
* Added 5 README files
* corrected arithmetic_analysis README
* Update audio_filters/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update backtracking/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update bit_manipulation/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Added a gray_code_sequence.py file to the bit_manipulation folder
* Added a descriptive name for variable n changing it to bit count
* Update gray_code_sequence.py
Co-authored-by: krishchopra02 <krishchopra02@gmail.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Fix several typos
* Update bit_manipulation/README.md
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Update double_sort.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* Added binary shifts and twos complement functions to bit manipulation package
* Fixed problem representing 0 wrong
* More testing
* Fixed problems
* Fixed formatting
* More format fixes
* Format fixes
* Fixed docstrings and added url
* Minor change to url
* Create Python/bit_manipulation/README.md
To open up a new area of algorithms...
@Shrutikabansal I hope that you will contribute some of your work here.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>