* Implemented Exponential Search with binary search for improved performance on large sorted arrays.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added type hints and doctests for binary_search and exponential_search functions. Improved code documentation and ensured testability.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and rename Exponential_Search.py to exponential_search.py
* [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>
* Added algorithm to generate numbers in lexicographical order
* Removed the test cases
* Updated camelcase to snakecase
* Added doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added descriptive name for n
* Reduced the number of letters
* Updated the return type
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated import statement
* Updated return type to Iterator[int]
* removed parentheses
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: add Matrix Exponentiation method
docs: updated the header documentation and added new documentation for
the new function.
* feat: added new function matrix exponetiation method
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* feat: This function uses the tail-recursive form of the Euclidean algorithm to calculate
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* reduced the number of characters per line in the comments
* removed unwanted code
* feat: Implemented a new function to swaap numbers without dummy variable
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed previos code
* Done with the required changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Done with the required changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Done with the required changes
* Done with the required changes
* Done with the required changes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update maths/fibonacci.py
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Done with the required changes
* Done with the required changes
* Done with the required changes
* [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: Tianyi Zheng <tianyizheng02@gmail.com>
* Added doctests to min_cost_string_conversion.py and removed :c specifier
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* resolved line length issues based on ruff requirements
* modified in compliance with ruff for line length
* Update strings/min_cost_string_conversion.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Improve comments, add doctests for kahns_algorithm_topo.py
* Improve function docstring
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Rename variables, remove print
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Word Break algorithm
* Add Word Break algorithm
* [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>
* Ruff test resolution
* [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>
* 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>
* Create count_vowels.py
* [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>
* fix: modify the depracated code and add new tests
* fix: remove test from pr
* fix: remove the useless utc import
* fix: add explicit tz argument
* fix: fixes ruff checking
* Remove UP017 #noqa comments from code
* Update get_top_billionaires.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update get_top_billionaires.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>