* Fix binary search with duplicates issue #13886
* Add docstrings to binary search functions
Added docstrings for lower_bound and upper_bound functions.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update searches/binary_search.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor docstrings for lower_bound and upper_bound
Updated docstring parameter and return type annotations for lower_bound and upper_bound functions.
* Update searches/binary_search.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: John Law <johnlaw.po@gmail.com>
* feat: optimizing the prune function at the apriori_algorithm.py archive
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: fixing the unsorted importing statment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix: fixing the key structure to a tuple that can be an hashable structure
* Update apriori_algorithm.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update apriori_algorithm.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Add doctest for circular queue overflow condition
Added a doctest to test the QUEUE IS FULL exception when attempting to enqueue an element into a full circular queue. This improves test coverage for line 67 in data_structures/queues/circular_queue.py.
Fixes#9943
* Update circular_queue.py
* Update circular_queue.py
* Update circular_queue.py
* Update circular_queue.py
---------
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
- Add -> None return type annotation to pi_estimator function
- Improves code clarity and follows Python type hinting best practices
- Function already had proper type hints for parameters
Co-authored-by: Gunish Mukherji <gunishmukherji@Gunishs-MacBook-Air.local>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Fix typo in spheres intersection print statement
* Fix typo in CONTRIBUTING.md
* Improve comments in comb_sort.py
* pyproject.toml: tool.ruff.target-version = "py314"
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix comment formatting in lint.ignore section
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added t-SNE with Iris dataset example
* Added t-SNE with Iris dataset example
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated with descriptive variables
* Add descriptive variable names
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add Descriptive Variable names
* Adding Descriptive variable names
* Update machine_learning/t_stochastic_neighbour_embedding.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update machine_learning/t_stochastic_neighbour_embedding.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Improved line formatting
* Adding URL for t-SNE Wikipedia
* Apply suggestion from @cclauss
---------
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 rotate_array.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed issues
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed reverse issue
* added doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* changed k to steps for a descriptive name
* fixed non-pep
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix covid_stats_via_xpath.py
Improve error handling.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix covid_stats_via_xpath.py typo
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix ruff
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* upgrade covid_stats_via_xpath.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and fix covid_stats_via_xpath.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* pre-commit autoupdate 2025-09-11
* [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>
* Adding the function isProthNumber(n : int) which returns true if n is a Proth number
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixing the issues of the isprothnumber function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* New fixes on isprothnumber()
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fixes on isprothnumber()
* Fixes on isprothnumber
* Fixes on isprothnumber()
* Fixes on isprothnumber
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
* Update proth_number.py
---------
Co-authored-by: Juanitoupipou <juan.dupierris@imt-atlantique.net>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Added space complexity
Space complexity of merge sort is a key factor, when compared to quick sort
* Update merge_sort.py
---------
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Add weierstrass_method for approximating complex roots
- Implements Durand-Kerner (Weierstrass) method for polynomial root finding
- Accepts user-defined polynomial function and degree
- Uses random perturbation of complex roots of unity for initial guesses
- Handles validation, overflow clipping, and includes doctest
* Update weierstrass_method.py
* add more tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update weierstrass_method.py
* Update weierstrass_method.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>