* completed optimised code for job sequencing with deadline problem
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* completed optimised code for job sequencing with deadline problem
* completed optimized code for job sequencing with deadline problem
* completed optimised code for job sequencing with deadline problem
* completed optimised code for job sequencing with deadline problem
* completed optimised code for job sequencing with deadline problem
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* completed optimized code for the issue "Job Scheduling with deadlines"
* completed optimized code for the issue "Job Scheduling with deadlines"
* completed optimized code for the issue "Job Scheduling with deadlines"
* Update greedy_methods/job_sequencing_with_deadline.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated reviews
* Updated reviews
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and rename greedy_methods/job_sequencing_with_deadline.py to scheduling/job_sequencing_with_deadline.py
Co-authored-by: lakshayroop5 <87693528+lavenroop5@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add Catalan number to maths
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add algorithm for Newton's Law of Gravitation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/newtons_law_of_gravitation.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* One and only one argument must be 0
* Update newtons_law_of_gravitation.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>
As described in #6095, this reduces the chances to observe a O(n^2) complexity.
Here, `collection.pop(pivot_index)` is avoided for performance reasons.
Fixes: #6095
* fixed wrong algo name to radix sort
* added wiki url
* Added "source" in docstring
* Update radix_sort.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* adding the dna algorithm
* following bot recommendations
following bot recommendations for the indentation
* following bot recommendations
following bot recommendations regarding indentation [ again ]
* following bot recommendations
following bot recommendations regarding indentation [ again. ]
* following bot recommendations
following bot recommendations.
* Enhance fenwick_tree.py
* Change update to add in fenwick_tree.py
* Some changes
* Fix bug
* Add O(N) initializer to FenwickTree
* Add get method to Fenwick Tree
* Change tree in Fenwick Tree
* Add rank query to FenwickTree
* Add get_array method to FenwickTree
* Add some tests
* Update data_structures/binary_tree/fenwick_tree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/binary_tree/fenwick_tree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/binary_tree/fenwick_tree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* change `List` to `list`
Co-authored-by: Christian Clauss <cclauss@me.com>
As described in CONTRIBUTING.md
> Expand acronyms because gcd() is hard to understand but greatest_common_divisor() is not.
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
* Added algorithm for creating Hamming numbers series in Python
* Changed to f-string format.
* Added modifications
* Update and rename hamming.py to hamming_numbers.py
* Update hamming_numbers.py
* Update hamming_numbers.py
* Rename maths/series/hamming_numbers.py to maths/hamming_numbers.py
Co-authored-by: John Law <johnlaw.po@gmail.com>
* renames prime functions and occurances in comments
* changes implementation of primality testing to be uniform
* adds static typing as per conventions
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Get rid of the Union
* updating DIRECTORY.md
* Get rid of the Union
* Remove the redundant pre-commit runs.
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* initial commit
* first implementation of hard margin
* remove debugging print
* many commits squashed because pre-commit was buggy
* more kernels and improved kernel management
* remove unnecessary code + fix names + formatting + doctests
* rename to fit initial naming
* better naming and documentation
* better naming and documentation
* MAINT: Used f-string method
Updated the code with f-string methods wherever required for a better and cleaner understanding of the code.
* Updated files with f-string method
* Update rsa_key_generator.py
* Update rsa_key_generator.py
* Update elgamal_key_generator.py
* Update lru_cache.py
I don't think this change is efficient but it might tackle the error as the error was due to using long character lines.
* Update lru_cache.py
* Update lru_cache.py
Co-authored-by: cyai <seriesscar@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>