3517 Commits

Author SHA1 Message Date
Isidro
11a61d15dc
Generic type hint in DDL (#12677)
* Generic type hint in DDL

Instead of forcing int

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-04-21 22:04:39 +03:00
pre-commit-ci[bot]
9891d2bc30
[pre-commit.ci] pre-commit autoupdate (#12680)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.5 → v0.11.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.5...v0.11.6)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
2025-04-21 19:54:11 +02:00
Samuel Willis
a1aa6313e0
Adding time and a half pay calculator algorithm to financial folder (#12662)
* Create time&half-pay.py

* Update time&half-pay.py

* Update time&half-pay.py

* Rename time&half-pay.py to time_and_half_pay.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update time_and_half_pay.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update time_and_half_pay.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update time_and_half_pay.py

* Update time_and_half_pay.py

* Update time_and_half_pay.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>
2025-04-18 02:33:08 +03:00
Mindaugas
c585cb1227
Solution for the Euler Project problem 136 (#12658)
* Add initial version of file for the Euler project problem 136 solution.

* Add documentation and tests for the Euler project problem 136 solution.

* Update sol1.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update sol1.py

* Update sol1.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-18 02:16:15 +03:00
Naitik Dwivedi
42820634f3
Add matrix inversion algorithm using NumPy (#12657)
* Create matrix_inversion.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update matrix_inversion.py

* Update matrix_inversion.py

* Update matrix_inversion.py

* Update matrix_inversion.py

* Update matrix_inversion.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>
2025-04-14 21:57:13 +03:00
Mindaugas
d123cbc649
Solution for the Euler Project Problem 122 (#12655)
* Add initial version for euler project problem 122.

* Add doctests and documentation for the project euler problem 122.

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-04-14 21:30:25 +03:00
parth-6945
cc621f1fdd
Add find_unique_number algorithm to bit manipulation (#12654)
* Add find_unique_number algorithm to bit manipulation

* [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>
2025-04-14 21:01:29 +03:00
pre-commit-ci[bot]
4ed61418a8
[pre-commit.ci] pre-commit autoupdate (#12671)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.4...v0.11.5)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-14 19:55:55 +02:00
Kim
a4576dc2a4
fix: correct typo "util" to "until" (#12653) 2025-04-09 09:24:37 +03:00
pre-commit-ci[bot]
5afe02994e
[pre-commit.ci] pre-commit autoupdate (#12661)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.2 → v0.11.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.2...v0.11.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-07 23:20:19 +02:00
Maxim Smolskiy
0c8cf8e987
Fix bug for data_structures/linked_list/doubly_linked_list_two.py (#12651)
* Fix bug for data_structures/linked_list/doubly_linked_list_two.py

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py
2025-04-02 10:23:55 +03:00
Isidro
baab802965
doubly linked list: add dataclass and typing (#12647)
* Node is a dataclass

* fix mypy errors

* LinkedList is a dataclass

* fix mypy errors

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

* Update doubly_linked_list_two.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-04-01 21:55:14 +03:00
Isidro
f10a5cbfcc
prefix_evaluation: Add alternative recursive implementation (#12646)
* prefix_evaluation: Add alternative recursive implementation

* improve doc

* better variable name calc->operators

* Update prefix_evaluation.py

* Update prefix_evaluation.py

* Update prefix_evaluation.py

* Update prefix_evaluation.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-04-01 00:09:14 +03:00
Tony Dang
74b540ad73
Genetic Algorithm: Fix bug in multi-threading (#12644)
* Fix bug in multi-threading

- Multi-threading (despite being commented out) had a tiny bug: missing target argument (2nd argument).
- Commented out code was also slightly hard to understand, added (Option 1/2) in comments to clarify where a user may choose between 2 implementations.

* Update basic_string.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-03-29 11:13:47 +03:00
pre-commit-ci[bot]
e3773dbec1
[pre-commit.ci] pre-commit autoupdate (#12631)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.0 → v0.11.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.0...v0.11.2)
- [github.com/abravalheri/validate-pyproject: v0.24 → v0.24.1](https://github.com/abravalheri/validate-pyproject/compare/v0.24...v0.24.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-24 20:05:41 +01:00
Pranjay kumar
580273eeca
Improve prefix_sum.py (#12560)
* Update prefix_sum.py

Index Validation for get_sum

Raises ValueError if start or end is out of range or start > end.
Handles cases where the array is empty.
 Empty Array Support

If an empty array is passed, get_sum raises an appropriate error instead of failing unexpectedly.
 Optimized contains_sum Initialization

Initializes sums with {0} for efficient subarray sum checking.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update prefix_sum.py

* Update prefix_sum.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update prefix_sum.py

* Update prefix_sum.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>
2025-03-20 02:33:46 +03:00
pre-commit-ci[bot]
edf7c372a9
[pre-commit.ci] pre-commit autoupdate (#12623)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.10...v0.11.0)
- [github.com/abravalheri/validate-pyproject: v0.23 → v0.24](https://github.com/abravalheri/validate-pyproject/compare/v0.23...v0.24)

* Fix ruff issues

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-03-18 09:53:49 +01:00
Maxim Smolskiy
7ce998b91c
Fix some RUF012 per file ignores (#11399)
* updating DIRECTORY.md

* Fix some RUF012 per file ignores

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Improve

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Improve

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-11 17:29:13 +03:00
pre-commit-ci[bot]
23eb174629
[pre-commit.ci] pre-commit autoupdate (#12614)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.9.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.9...v0.9.10)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
2025-03-11 08:51:28 +01:00
PAUL ADUTWUM
e3fb5309da
Improve decimal_to_fraction.py (#12611)
* Update decimal_to_fraction.py

* Update decimal_to_fraction.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-03-09 00:52:20 +03:00
PAUL ADUTWUM
4fbd350b6e
Improved test coverage in decimal_to_fraction.py (#12608)
* Imporved test coverage in  decimal_to_fraction.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update decimal_to_fraction.py

* Update decimal_to_fraction.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>
2025-03-09 00:47:04 +03:00
Ankana Pari
a415a953c3
Add largest rectangle histogram (#12269)
* added ridge regression

* added ridge regression

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added ridge regression

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* ridge regression

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolved errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* resolved conflicts

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added doctests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* ruff and minor checks

* minor chenges

* minor checks

* minor checks

* minor changes

* descriptive names

* Fix ruff check in loss_functions.py

* fixed pre-commit issues

* added largest rectangle histogram function

* added largest rectangle histogram function

* Update frequent_pattern_growth.py

* Update loss_functions.py

* Delete machine_learning/ridge_regression/__init__.py

* Delete machine_learning/ridge_regression/ADRvsRating.csv

* Delete machine_learning/ridge_regression/ridge_regression.py

* Delete machine_learning/ridge_regression/test_ridge_regression.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>
2025-03-09 00:35:07 +03:00
pre-commit-ci[bot]
fff34ed528
[pre-commit.ci] pre-commit autoupdate (#12599)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.7 → v0.9.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.7...v0.9.9)
- [github.com/tox-dev/pyproject-fmt: v2.5.0 → v2.5.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.5.0...v2.5.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-03 19:10:41 +01:00
PARIKSHIT SINGH
8826ad3a4d
feat: Implement Principal Component Analysis (PCA) (#12596)
- Added PCA implementation with dataset standardization.
- Used Singular Value Decomposition (SVD) for computing principal components.
- Fixed import sorting to comply with PEP 8 (Ruff I001).
- Ensured type hints and docstrings for better readability.
- Added doctests to validate correctness.
- Passed all Ruff checks and automated tests.
2025-03-02 12:03:12 +01:00
Sanjay Muthu
f528ce350b
Added dynamic_programming/range_sum_query.py (#12592)
* Create prefix_sum.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix pre-commit and ruff errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename prefix_sum.py to range_sum_query.py

* Refactor description

* Fix

* Refactor code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-02-27 14:31:08 +03:00
pre-commit-ci[bot]
114d4283b9
[pre-commit.ci] pre-commit autoupdate (#12591)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.6 → v0.9.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.6...v0.9.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-24 19:27:10 +01:00
sector
183fa06f40
Fix n-queens problem (#12583)
* Fix n-queens problem

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update n_queens.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update n_queens.py

* Update n_queens.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>
2025-02-22 11:16:29 +03:00
Maxim Evtush
a5aed92b4c
fix: typo in data_structures/linked_list/from_sequence.py (#12584) 2025-02-20 23:09:01 +03:00
pre-commit-ci[bot]
738253e800
git mv data_structures/queue data_structures/queues (#12577)
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-02-14 10:05:23 +01:00
lighting9999
338cbafe0d
Improve power.py (#12567)
* Fix And Add power.py

To fix the inaccuracies and allow handling of negative exponents and bases, the key issue lies in how negative numbers are handled in the power calculation, especially when dividing.
## Example Output:
```python
>>> power(4, 6)
4096
>>> power(2, 3)
8
>>> power(-2, 3)
-8
>>> power(2, -3)
0.125
>>> power(-2, -3)
-0.125
```

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update power.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update power.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update power.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update power.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>
2025-02-09 20:51:18 +03:00
pre-commit-ci[bot]
e59d819d09
[pre-commit.ci] pre-commit autoupdate (#12554)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.3 → v0.9.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.3...v0.9.4)
- [github.com/codespell-project/codespell: v2.4.0 → v2.4.1](https://github.com/codespell-project/codespell/compare/v2.4.0...v2.4.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-05 20:47:41 +01:00
pre-commit-ci[bot]
6c92c5a539
[pre-commit.ci] pre-commit autoupdate (#12542)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.2 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.2...v0.9.3)
- [github.com/codespell-project/codespell: v2.3.0 → v2.4.0](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.0)

* Update trifid_cipher.py

* Update pyproject.toml

* Update trifid_cipher.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-01-27 22:05:20 +01:00
Rachel Spears
13e4d3e76c
Fix error in avl_tree del_node function (#11510)
* fixed error in del_node function

* Update avl_tree.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-01-24 08:59:36 +03:00
Vijayalaxmi Wakode
c666db3729
Add Doc test bubble sort (#12070)
* The string manipulation - replace()

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update replace.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updating DIRECTORY.md

* Add doc test to bubble_sort

* Update DIRECTORY.md

* Delete strings/replace.py

* Update bubble_sort.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: vijayalaxmi777 <vijayalaxmi777@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-01-24 01:01:47 +03:00
Ronald Ngounou
9fb51b4169
Update docstrings in the functions definitions. (#11797) 2025-01-23 11:02:46 +03:00
pre-commit-ci[bot]
1f74db0c06
[pre-commit.ci] pre-commit autoupdate (#12536)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.9.1 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.1...v0.9.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-20 21:22:02 +01:00
Christian Clauss
91ebea1d99
Sphinx runs on ubuntu 24.04 arm (#12530)
* Speed up our Sphinx GitHub Action with ARM

# `runs-on: ubuntu-24.04-arm`
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

* updating DIRECTORY.md

---------

Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2025-01-19 08:33:35 +01:00
Nguyen Thi Thanh Minh
533767ff46
Doomsday Algorithm: Fix leap year check (#12396)
* Fix leap year check

Replace `!=` in `(year % 400) != 0` (line 49) with `==`

Justification: Years that are divisible by 100 (centurian == 100) but not by 400 (year % 400 != 0) are skipped and NOT leap year.

* Update parentheses

Correct the parentheses to make clear the precedence of the conditional check

* Update other/doomsday.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2025-01-17 19:07:44 -08:00
aydinomer00
0040ad47f9
Add butterfly pattern implementation (#12493)
* Add butterfly pattern implementation

* Add butterfly pattern implementation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add finalized butterfly pattern implementation and test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Delete graphics/test_butterfly_pattern.py

* Update butterfly_pattern.py

* Update butterfly_pattern.py

* Update butterfly_pattern.py

* Update butterfly_pattern.py

* Update butterfly_pattern.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>
2025-01-15 00:24:36 +03:00
Sanjay Muthu
f04d308431
Create longest_increasing_subsequence_iterative.py (#12524)
* Create longest_increasing_subsequence_iterative.py

* Update longest_increasing_subsequence_iterative.py

* Update longest_increasing_subsequence_iterative.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-01-14 23:49:04 +03:00
pre-commit-ci[bot]
4fe50bc1fc
[pre-commit.ci] pre-commit autoupdate -- ruff 2025 stable format (#12521)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update maths/dual_number_automatic_differentiation.py

* Update maths/dual_number_automatic_differentiation.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dual_number_automatic_differentiation.py

* Update dual_number_automatic_differentiation.py

* No <fin-streamer> tag with the specified data-test attribute found.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-01-13 21:52:12 +01:00
Maxim Smolskiy
cfcc84edf7
Fix build (#12516)
* Empty commit

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-01-13 21:49:07 +01:00
Siddhant
787aa5d3b5
doctest all_combinations.py (#12506)
* doctest in all_combinations.py

* added doctest in all_combinations.py

* doctests in all_combinations.py

* add doctest all_combinations.py

* add

---------

Co-authored-by: Siddhant Jain <sjain35@buffalo.edu>
2025-01-12 17:54:23 -08:00
Sanjay Muthu
4c92de5e03
Fix dynamic_programming/longest_increasing_subsequence.py (#12517)
* Fix #12510

* Added the doctest mentioned in the issue

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed Grammer Mistake

* Update longest_increasing_subsequence.py

* Update longest_increasing_subsequence.py

* Update longest_increasing_subsequence.py

* Update longest_increasing_subsequence.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>
2025-01-13 02:35:22 +03:00
Maxim Smolskiy
b653aee627
Fix ruff (#12515)
* Empty commit

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Fix

* Fix

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com>
2025-01-12 17:05:08 +01:00
pre-commit-ci[bot]
bae33acf90
[pre-commit.ci] pre-commit autoupdate (#12507)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.8.6)
- [github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.0...v1.14.1)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <pre-commit-ci[bot]@users.noreply.github.com>
2025-01-06 21:12:13 +01:00
Kaustubh Mani Tripathi
12b1023a9d
[ADDED] Implementation of Geometric Mean. (#10421)
* [ADDED] Implementation of Geometric Mean.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rectified type hints

* Typo

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-12-30 18:16:32 -08:00
SEIKH NABAB UDDIN
91a22c2e36
Create digital differential analyzer_line.py (#10929)
* Create DDA_line_drawing.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rename DDA_line_drawing.py to digital differential analyzer_line_drawing.py

* Rename DDA_line_drawing.py to digital_differential_analyzer_line_drawing.py

* Update digital_differential_analyzer_line_drawing.py

* Update digital_differential_analyzer_line_drawing.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line_drawing.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line_drawing.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line_drawing.py

* Update digital_differential_analyzer_line_drawing.py

* Update digital_differential_analyzer_line_drawing.py

* Update digital_differential_analyzer_line_drawing.py

* [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: Tianyi Zheng <tianyizheng02@gmail.com>

* Update and rename digital_differential_analyzer_line_drawing.py to digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update digital_differential_analyzer_line.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

* Fix doctest

* Trigger GH workflows

* Fix function call in main block

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2024-12-30 18:09:14 -08:00
Julien Richard
a4399022e5
chore: improve comments and add tests to trapezoidal rule (#11640)
* chore: improve comments and add tests to trapezoidal rule

* fix: too much characters in line

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update maths/trapezoidal_rule.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* fix: change function name in calls

* modify tests, changes numbers to remove coma

* updating DIRECTORY.md

* Fix doctest whitespace

* Try to fix line length in doctest

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: tianyizheng02 <tianyizheng02@users.noreply.github.com>
2024-12-30 17:11:29 -08:00
Paarth Goyal
8439fa8d1d
Added the algorithm to compute the time period of a simple pendulum (#10265)
* Added the algorithm to compute the time period of a simple pendulum

* imported g form scipy and changed doctests accordingly

* fixed formatting

* applied all suggested changes from code review

* Apply suggestions from code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-30 16:47:41 -08:00