* Added Dutch national flag sort Algorithm
* Changed file name to dnf_sort.py
* Added descriptive name and type hint
Added descriptive name and type hint for parameter with doctest for the function dnf_sort.
* Added test cases
* Added doctest cases
* Update sorts/dnf_sort.py
* Added doctest for dutch_national_flag_sort sorts/dnf_sort.py
* Update sorts/dnf_sort.py
* Added doctest for the function
dutch_national_flag_sort
* update file as per black code formatter
* Update dnf_sort.py
* Update and rename dnf_sort.py to dutch_national_flag_sort.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Approve functions used as default argumenets
* The default value for **seed** is the result of a function call
The default value for **seed** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `LinearCongruentialGenerator.__init__()` will only be called once per instance and it ensures that each instance will generate a unique sequence of numbers.
* The default value for **backend** is the result of a function call
The default value for **backend** is the result of a function call which is not normally recommended and causes flake8-bugbear to raise a B008 error. However, in this case, it is accptable because `Aer.get_backend()` is called when the function is definition and that same backend is then reused for function calls.
* Update linear_congruential_generator.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* Update ripple_adder_classic.py
* luhn.py: Favor list comprehensions over maps
As discussed in CONTRIBUTING.md.
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* boruvka.py: A few simplifications and f-strings
Python f-strings simplify the code and [should speed up execution](https://www.scivision.dev/python-f-string-speed).
@srkchowdary2000 Your review, please.
* updating DIRECTORY.md
* fixup! Streamline the test
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added Borůvka's algorithm.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Solved Test Cases Errors.Removed WhiteSpaces.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Code Changes.
* Added Borůvka's algorithm, a graph algorithm that finds the minimum spanning tree. Code Changes.
* add date_to_weekday finder method
* reformat date_to_weekday method
* remove time
* remove hardcode weekdays list
* fix return type error
* fixing fail issue
* Finding the test failing issue
* after testing the pre-commit in local environment
* Fix mypy errors for maths/greedy_coin_change.py
* Fix mypy errors for maths/two_sum.py
* Fix mypy errors for maths/triplet_sum.py
* Fix the format of maths/greedy_coin_change.py
* Fix the format of maths/greedy_coin_change.py
* Fix format with pre-commit
* Create exchange_sort.py
added exchange sort
* Fixed doctest in exchange_sort.py
* Fixed formatting error and added new length variable
added empty line at end of exchange_sort.py and turned len(numbers) into a variable
* Fixed formatting errors with black
added empty line
* case switch using python
* review comments
* added type hints
* general code format
* [mypy] Fix type annotations for secant_method.py
* remove bad push
* add phone_validator method
* change the phone_validator to indian_phone_validator
* Unnecessary comments removed
* all comments deleted
* Fixes: #{} new line issue
* code reformatted using black
* fixed colons and spaces
* fixed colons and spaces
* random anime character python script
* more tests passed
* type hint updated
Co-authored-by: Christian Clauss <cclauss@me.com>
* type hint updated again
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update random_anime_character.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Removes overuse of lambdas, improves readability and processing time when it finds bitstring to print out.
Removes overuse of lambdas, uses dictionary instead. This improves readability and processing time when it finds the bitstring to print out.
* Update huffman.py
* Average mean refactor
Added doctests and type hints to average_mean
* Wiki link added
* Empty list check added
Empty list check added
Type hint changed to typing.List
* Luhn algorithm
Perform Luhn validation on input string
Algorithm:
* Double every other digit starting from 2nd last digit.
* Subtract 9 if number is greater than 9.
* Sum the numbers
https://en.wikipedia.org/wiki/Luhn_algorithm
* Update DIRECTORY.md
* Update luhn.py
* Update luhn.py
* Update luhn.py
* Update luhn.py
* Update DIRECTORY.md