* added recursive dfs backtracking for count paths with doctests
* fixed doc testing
* added type hints
* redefined r as row, c as col
* fixed naming conventions, ran mypy, only tests that didn't pass were using List[], rathan list()
* added another doctest, as well as a explanation above
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update matrix/count_paths.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Apply suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: J <jasondevers@wireless-10-105-49-243.umd.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* added support for inverse of 3x3 matrix
* Modified Docstring and improved code
* fixed an error
* Modified docstring
* Apply all suggestions from code review
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* added script for solving system of linear equations in two variables
* implemented all the suggested changes
* changed RuntimeError to ValueError
* Update matrix/system_of_linear_equation_in_2_variables.py
* Update matrix/system_of_linear_equation_in_2_variables.py
* Update and rename system_of_linear_equation_in_2_variables.py to cramers_rule_2x2.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Maximum area of island program added
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden <caedenperelliharris@gmail.com>
* Review's comment resolved
* max area of island
* PR Comments resolved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Test case fail fix
* Grammer correction
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* flake8 issue resolved
* some variable name fix
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* PR, comments resolved
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update matrix/max_area_of_island.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update matrix/max_area_of_island.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* PR, comments resolved
* Update max_area_of_island.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Typo
Co-authored-by: Caeden <caedenperelliharris@gmail.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>
* ci: Add ``flake8-pep3101`` plugin to ``pre-commit``
* refactor: Remove all modulo string formatting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: Remove ``flake8-pep3101`` plugin from ``pre-commit``
* revert: Revert to modulo formatting
* refactor: Use f-string instead of `join`
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Create binary_search_matrix.py
Added an algorithm to search in matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update binary_search_matrix.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix Indentation
* Update matrix/binary_search_matrix.py
Co-authored-by: Christian Clauss <cclauss@me.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>
* 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>
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added OOP aproach to matrices
* created methods for minors, cofactors, and determinants and added corresponding doctests
* Added methods for adjugate, inverse, and identity (along with corresponding doctests) to matrix_class.py
A small bug persists that causes the doctest to fail.
After a couple Matrix objects are printed, the next one is printed in a different format.
* formatted matrix_class.py with python/black
* implemented negation and exponentiation as well as corresponding doctests in matrix_class.py. Also implemented eq and ne comparison operations
* changed __str__ method in matrix_class.py to align with numpy standard and fixed bug in cofactors method
* removed property decorators from several methods in matrix_class.py
* Created Sherman Morrison
* Added docstring for class
* Updated Sherman morrison
1. Added docstring tests
2. Tweaked __str__() using join
3. Added __repr__()
4. Changed index validation to be independent method
* Applied cclauss's point
1. Reduced line length for __str__()
2. Removed parens for assert
* rotate_matrix.py: Add type hints for return values
@obelisk0114 Your review please?
* Fix typo
* Run the code thru python/black
https://github.com/python/black
* Fix 270 comment
* Simplify with get_data() and test the alternatives
* ) * 3
* Update rotate_matrix.py
* Update rotate_matrix.py
* Update matrix_operation.py
1. Adding error checks for integer inputs
2. Adding error checks for matrix operations where size requirements do not match up
3. Added matrix subtraction function
4. included error check so only integer is passed into identity function
* Create test_matrix_operation.py
* Update matrix_ops and Add Test Cases
1. Included error checks in matrix operation. There were some cases where the functions would not work correctly.
2. PEP8 changes to matrix_operations.py
3. added test cases for matrix operations using pytest.
* Update pytest.ini
Add carriage return to end of file
@AnupKumarPanwar @ParthS007 @poyea Could I please get a quick review on this one because I made a mistake here that breaks the build for new pull requests.
* Added matrix exponentiation approach for finding fibonacci number.
* Implemented the way of finding nth fibonacci.
* Complexity is about O(log(n)*8)
* Updated the matrix exponentiation approach of finding nth fibonacci.
- Removed some extra spaces
- Added the complexity of bruteforce algorithm
- Removed unused function called zerro()
- Added some docktest based on request
* Updated the matrix exponentiation approach of finding nth fibonacci.
- Removed some extra spaces
- Added the complexity of bruteforce algorithm
- Removed unused function called zerro()
- Added some docktest based on request
* Tighten up main() and add comments on performance