* Remove redundent function
After reviewing this code, I've noticed that the `is_completed` function is a redundant operation.
Increasing the number of loops required for each step of the sudoku solver.
This should remove n² operations where n is the width of the grid.
* Update sudoku.py
Remove additional newline
* Added the matrix_exponentiation.py file in maths directory
* Implemented the requested changes
* Update matrix_exponentiation.py
* resolve merge conflict with upstream branch
* add new line at end of file
* add wavelet_tree
* fix isort issue
* updating DIRECTORY.md
* fix variable names in wavelet_tree and correct typo
* Add type hints and variable renaming
* Update data_structures/binary_tree/wavelet_tree.py
Add doctests to placate the algorithm-bot, thanks to @cclauss.
Co-authored-by: Christian Clauss <cclauss@me.com>
* Move doctest to individual functions and reformat code
* Move common test array to the global scope and reuse in tests
* MMove test array to global scope and minor linting changes
* Correct the failing pytest tests
* MUse built-in list for type annotation
* Update wavelet_tree.py
* types-requests
* updating DIRECTORY.md
* Update wavelet_tree.py
* # type: ignore
* # type: ignore
* Update decrypt_caesar_with_chi_squared.py
* ,
* Update decrypt_caesar_with_chi_squared.py
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Aniruddha Bhattacharjee <aniruddha@Aniruddhas-MacBook-Air.local>
A serious bug was addressed with this pull request. The mode function previously
didn't return the mode of the input list. Instead, it always returned the first value.
Due to lacking tests, the bug was never caught. This pull request also adds new
functionality to the function, allowing support for more than one mode.
See #4464 for details.
* * Mistake in average_mode.py fixed. The previous solution was to returnthe
value on the first loop iteration, which is not correct, more than that it
used to delete repeating values, so result's array and check array lost
relation between each other
* Type hint added
* redundant check_list deleted
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Suggestions resolved
* output typing changed to Any
* test cases added
* Black done
File formatted
* Unused statistics import
statistics only used in doctest, now they are imported in doctest
* Several modes support added
Several modes support added
* Comment fix
* Update maths/average_mode.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Suggestions added
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
This is a documentation fix. This fix patches a mistake in the description of the Armstrong number.
* * Doc fix
* Armstrong number is not the sum of cube's of number digits, but
the sum of number's digits each raised to the power of the number of digits
* Update armstrong_numbers.py
Line shorten
This is a different recursive implementation of the merge sort algorithm.
* Recursive Merge Sort That Accepts an Array
Recursive Merge Sort That Accepts an Array
* Add Wikipedia Link
* Fixes naming conventions
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
* Adds black format
* Removes unused variables
* Fixes variable names and adds documentation
* Fixes variable names to use snake_case.
* Removes double #.
* Update sorts/recursive_mergesort_array.py
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
Co-authored-by: Maxim R. <49735721+mrmaxguns@users.noreply.github.com>
Co-authored-by: Benjamin Fein <benfein78@icloud.com>
* fix(action): testing and fixing errors
* fix: testing if all is a valid entry for workflows
* fix: more events to trigger workflow tests
* fix: double quotes -> single quotes
* fix: add workflows name to the list
* revert: remove added events
This reverts commit 3daeeb2ba3
* Updated name from lstm_prediction.py_lf to lstm_prediction.py and also imported keras
* Edited the changes
* tensorflow 2.5 is has shipped!!!
* Update lstm_prediction.py
* Update lstm_prediction.py
* One blank line, not two?
Co-authored-by: Christian Clauss <cclauss@me.com>
* fix(mypy): type annotations for cipher algorithms
* Update mypy workflow to include cipher directory
* fix: mypy errors in hill_cipher.py
* fix build errors
* fix hashes-folder
* Update build.yml
* fix doctests
* return-values to int
* Update hashes/adler32.py
* type hints for elements
Co-authored-by: Christian Clauss <cclauss@me.com>