* Add word ladder algorithm in backtracking
* Improve comments and implement ruff checks
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change BFS to Backtracking
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Incorporate PR Changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add type hints for backtrack function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: Hardvan <Hardvan@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Implemented KD-Tree Data Structure
* Implemented KD-Tree Data Structure. updated DIRECTORY.md.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Create __init__.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/example_usage.py
* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/hypercube_points.py
* added typehints and docstrings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* docstring for search()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added tests. Updated docstrings/typehints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated tests and used | for type annotations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* E501 for build_kdtree.py, hypercube_points.py, nearest_neighbour_search.py
* I001 for example_usage.py and test_kdtree.py
* I001 for example_usage.py and test_kdtree.py
* Update data_structures/kd_tree/build_kdtree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/kd_tree/example/hypercube_points.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/kd_tree/example/hypercube_points.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added new test cases requested in Review. Refactored the test_build_kdtree() to include various checks.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considered ruff errors
* Considered ruff errors
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update kd_node.py
* imported annotations from __future__
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Implementation of the suffix tree data structure
* Adding data to DIRECTORY.md
* Minor file renaming
* minor correction
* renaming in DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considering ruff part-1
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considering ruff part-2
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considering ruff part-3
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considering ruff part-4
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considering ruff part-5
* Implemented Suffix Tree Data Structure.
Added some comments to my files in #11532, #11554.
* updating DIRECTORY.md
* Implemented Suffix Tree Data Structure.
Added some comments to my files in #11532, #11554.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Ramy-Badr-Ahmed <Ramy-Badr-Ahmed@users.noreply.github.com>
* Implemented KD-Tree Data Structure
* Implemented KD-Tree Data Structure. updated DIRECTORY.md.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Create __init__.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/example_usage.py
* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/hypercube_points.py
* added typehints and docstrings
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* docstring for search()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added tests. Updated docstrings/typehints
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updated tests and used | for type annotations
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* E501 for build_kdtree.py, hypercube_points.py, nearest_neighbour_search.py
* I001 for example_usage.py and test_kdtree.py
* I001 for example_usage.py and test_kdtree.py
* Update data_structures/kd_tree/build_kdtree.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/kd_tree/example/hypercube_points.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update data_structures/kd_tree/example/hypercube_points.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Added new test cases requested in Review. Refactored the test_build_kdtree() to include various checks.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Considered ruff errors
* Considered ruff errors
* Apply suggestions from code review
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update kd_node.py
* imported annotations from __future__
* [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>
* updating DIRECTORY.md
* Remove separate directory for gaussian_elimination_pivoting.py
Delete the directory linear_algebra/src/gaussian_elimination_pivoting/
and move its algorithm file, gaussian_elimination_pivoting.py, into the
parent src/ directory. The gaussian_elimination_pivoting/ directory only
exists because gaussian_elimination_pivoting.py reads an example numpy
array from matrix.txt, but this input file and IO operation is entirely
unnecessary because gaussian_elimination_pivoting.py already has the
exact same array hard-coded into a variable.
* updating DIRECTORY.md
---------
Co-authored-by: tianyizheng02 <tianyizheng02@users.noreply.github.com>
* Remove duplicate implementation of median of two arrays algorithm
Remove maths/median_of_two_arrays.py because the repo has two
implementations of this algorithm, with
data_structures/arrays/median_two_array.py being the other. Even though
maths/median_of_two_arrays.py is the older implementation, the newer
implementation is better documented, has better error handling, and is
already located in a more appropriate directory.
* updating DIRECTORY.md
---------
Co-authored-by: tianyizheng02 <tianyizheng02@users.noreply.github.com>
* Feat: Added Fast inverse square root
* Fix: Added typehint
* Fix: Added doctests that break the code, changed var name
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix: fixed length of docstring
* Update fast_inverse_sqrt.py
---------
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>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Remove eval from arithmetic_analysis/newton_raphson.py
* Relocate contents of arithmetic_analysis/
Delete the arithmetic_analysis/ directory and relocate its files because
the purpose of the directory was always ill-defined. "Arithmetic
analysis" isn't a field of math, and the directory's files contained
algorithms for linear algebra, numerical analysis, and physics.
Relocated the directory's linear algebra algorithms to linear_algebra/,
its numerical analysis algorithms to a new subdirectory called
maths/numerical_analysis/, and its single physics algorithm to physics/.
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add: Time Conversion Function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update conversions/time_conversions.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* fix: required changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: err
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update time_conversions.py
---------
Co-authored-by: Jeel Gajera <jeelgajera00@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>
* added other possible cases
* added test for correct output of truth table
* updating DIRECTORY.md
* Update nor_gate.py
---------
Co-authored-by: = <=>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Add: FP Growth Algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changes names
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Revert "changes names"
This reverts commit c0470094d0.
* refactore code
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update frequent_pattern_growth.py
---------
Co-authored-by: Jeel Gajera <jeelgajera00@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>
* sync
* fixes#8098
* deleted: graphs/check_bipartite_graph_all.py
new file: graphs/check_bipatrite,py
* renamed: graphs/check_bipatrite,py -> graphs/check_bipatrite.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add the new tests
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: adding Apriori Algorithm
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: doctest, typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: type error, code refactore
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: refactore code
* fix: doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: E501, B007
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: err
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: arg typ err
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: typo
* fix: typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Replace generate_candidates() with itertools.combinations()
* mypy
* Update apriori_algorithm.py
---------
Co-authored-by: Jeel Gajera <jeelgajera00@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>
* Conolidated two scripts reverse_letters.py and reverse_long_words.py into one because of similar functionality
* Added a new line to accomodate characters without going over 88 char limit
* fixed grammar to pass pre-commit
* Changed faulty test case entirely to pass pre commit
* fixed a test case which was wrong
---------
Co-authored-by: Keyboard-1 <142900182+Keyboard-1@users.noreply.github.com>
* Python mirror_formulae.py is added to the repository
* Changes done after reading readme.md
* Changes for running doctest on all platforms
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change 2 for Doctests
* Changes for doctest 2
* updating DIRECTORY.md
* Doctest whitespace error rectification to mirror_formulae.py
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Python mirror_formulae.py is added to the repository
* Changes done after reading readme.md
* Changes for running doctest on all platforms
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change 2 for Doctests
* Changes for doctest 2
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>