Commit Graph

3562 Commits

Author SHA1 Message Date
Ahmad Alharbi
d16cac6e4f feat: Add recursive implication function for lists (#12855)
* feat: Add recursive implication function for lists

* Update imply_gate.py

* Update imply_gate.py

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

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

---------

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-08-24 15:08:52 +03:00
conti
060fd8ee2c Fix reverse_bits.py: correct 32-bit reversal and improve docstrings (#12924)
* Fix reverse_bits.py (#12868)

* Update reverse_bits.py

* Update reverse_bits.py

* Update reverse_bits.py

* Update reverse_bits.py

* Update reverse_bits.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-24 14:49:43 +03:00
Diya
9ddb0272bf Adding doctest for md_prefix function in build_directory_md.py (#12874)
* Adding doctests for md_prefix function in build_directory_md.py

* Update build_directory_md.py

* Update build_directory_md.py

* Update build_directory_md.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-24 14:22:00 +03:00
Chandra Sekhar Pola
c2b90034a0 Fix code style in README.md (#12843)
* Fix #12840 code style

* Update README.md

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-08-24 14:01:21 +03:00
Milad Khoshdel
a8c5616857 Simplify Capitalize Function (#12879)
* Simplify the capitalize function using ASCII arithmetic to make the algorithm five times faster.

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

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

* Update capitalize.py

* Update capitalize.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-08-24 13:07:39 +03:00
dependabot[bot]
e224532107 Bump actions/upload-pages-artifact from 3 to 4 (#12922)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-23 05:48:47 +02:00
pre-commit-ci[bot]
beb3cfdf28 [pre-commit.ci] pre-commit autoupdate (#12900)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.8 → v0.12.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.8...v0.12.9)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.17.1)

* 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>
2025-08-19 14:28:03 +02:00
dependabot[bot]
f662b63d1a Bump actions/checkout from 4 to 5 (#12891)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 09:30:10 +02:00
pre-commit-ci[bot]
d05f5d22d9 [pre-commit.ci] pre-commit autoupdate (#12880)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.5...v0.12.8)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.17.1)

* 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>
2025-08-11 21:03:20 +02:00
pre-commit-ci[bot]
7a0fee401d [pre-commit.ci] pre-commit autoupdate (#12864)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.4 → v0.12.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.4...v0.12.5)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.17.0)

* Apply suggestion from @cclauss

* --ignore=web_programming/current_stock_price.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-07-29 17:27:27 -04:00
pre-commit-ci[bot]
6e1a104877 [pre-commit.ci] pre-commit autoupdate (#12846)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.3 → v0.12.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.3...v0.12.4)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.17.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.17.0)

* 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>
2025-07-21 15:29:24 -04:00
pre-commit-ci[bot]
d1a9486f09 [pre-commit.ci] pre-commit autoupdate (#12781)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.11 → v0.12.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.11...v0.12.2)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.15.0...v1.16.1)

* Update .pre-commit-config.yaml

---------

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-07-11 23:06:49 +02:00
Asim Hanif
5a4a6a5497 Update .pre-commit-config.yaml to reflect current linting and formatt… (#12841)
* Update .pre-commit-config.yaml to reflect current linting and formatting setup

- Replaced outdated references to `black` with the actual tools used in the repo: `ruff` and `ruff-format`.
- Ensured all configured hooks are up to date and relevant to Python development.
- This aligns the linting and formatting setup with the project's actual pre-commit pipeline.
- Improves consistency for contributors by preventing confusion between formatting tools.

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

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

* We use httpx, not requests

* response = httpx.get(request_url, timeout=10).raise_for_status()

---------

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-07-11 22:25:53 +02:00
Bertrand Awenze
ed7c9b51f9 Fix devcontainer build failure (#12837)
* add post-installation script

* set zsh as default terminal and make post-install execution on postcreate

* rename file

* rename script

* Create devcontainers_ci.yml

* Update devcontainer.json

* Update devcontainers_ci.yml

Never push image built here. It's for build testing purpose only.

* postCreateCommand update to reflect that the shell script has been renamed.

* update devcontainer readme file

* trigger workflow only on devcontainer/** changes

* prettier refactor
2025-07-09 14:25:18 +02:00
Christian Clauss
5c05335b27 hill_cipher.py: Use int() to gracefully deal with float input (#12833)
* https://github.com/TheAlgorithms/Python/pull/12821#discussion_r2186998710
2025-07-07 13:58:59 +05:30
Christian Clauss
cd3c3c3130 Various ruff fixes (#12821) 2025-07-06 01:35:29 +03:00
Qasim Umar
7665ba5e25 Add unit tests for factorial.py (#12815)
* Add unit tests for factorial.py

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

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

* uvx --python=3.12 unittest2pytest --write test_factorial.py

* Update error message in current_stock_price.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-07-05 12:58:45 +02:00
Mindaugas
c3d4b9e54d Add doctests for the boyer_moore_search algorithm. (#12769)
* Add doctests for the boyer_moore_search algorithm.

* Update boyer_moore_search.py

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

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

* Update boyer_moore_search.py

* Update boyer_moore_search.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-06-02 20:32:47 +03:00
JEONGHYUN MIN
4b077c06b6 feat: create straight_line_depreciation (#12377)
Co-authored-by: Jeonghyun Min <20122791@tafe.wa.edu.au>
2025-05-31 17:11:46 -04:00
Christian Clauss
d0d7f0b18a maths/radix2_fft.py: Fix calculation for Python 3.14 (#12772)
* maths/radix2_fft.py: Fix calculation for Python 3.14

As suggested at:
* https://github.com/TheAlgorithms/Python/issues/12729#issuecomment-2878608477
* https://github.com/TheAlgorithms/Python/pull/12710#discussion_r2080117333

@MaximSmolskiy @KirilBangachev @skirpichev Careful review, please.  I am just implementing the suggestion, but I do not have any expertise in this area.

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

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

* Change test results

* GitHub Actions: Rename job from build to directory_writer

It is confusing to have two jobs named `build`.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-29 02:56:25 -04:00
pre-commit-ci[bot]
e26c388af0 [pre-commit.ci] pre-commit autoupdate (#12760)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.9 → v0.11.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.9...v0.11.11)
- [github.com/tox-dev/pyproject-fmt: v2.5.1 → v2.6.0](https://github.com/tox-dev/pyproject-fmt/compare/v2.5.1...v2.6.0)

* 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-05-26 22:55:55 +02:00
Mindaugas
a8ad2db2b9 Update matrix_chain_order calculation with more details and test. (#12759) 2025-05-23 00:17:48 +03:00
Mindaugas
e1115b5f15 Add tests and cleanup sum_of_subsets algorithm (#12746)
* Add tests and cleanup sum_of_subsets algorithm.

* Update sum_of_subsets.py

* Update sum_of_subsets.py

* Update sum_of_subsets.py

* Update sum_of_subsets.py

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

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

---------

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-05-23 00:07:43 +03:00
Isidro
c81cc26996 Improve hash map (#12678)
* Mutable _Item

* document falsy item

* resize_down: expected test result

* resize_down: actual result

This is a problem since it causes rapid cycling

* improve comment about falsy item

Co-authored-by: Andrey <Cjkjvfnby@gmail.com>

* fix long line

* Update hash_map.py

* Update hash_map.py

---------

Co-authored-by: Andrey <Cjkjvfnby@gmail.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-22 23:44:25 +03:00
Prajwal Choudhari
ca445f5296 Add bidirectional search algorithm implementation (#12649)
* Add bidirectional search algorithm implementation

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

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

* Fix style and linting issues in bidirectional search

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

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

* Add doctest for main function

* Add doctest for main function

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

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

* fixed deprications

* fixed deprications

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

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

* removed unused import

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

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

* Update bidirectional_search.py

* Update bidirectional_search.py

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

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

* Update bidirectional_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>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-22 18:08:37 +03:00
Isidro
26ad6891d8 Add median() function using Quickselect (#12676)
* Add median() function using Quickselect

* Update quick_select.py

* Update quick_select.py

* Update quick_select.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-21 21:33:29 +03:00
Christian Clauss
a2fa32c7ad Lukazlim: Replace dependency requests with httpx (#12744)
* Replace dependency `requests` with `httpx`

Fixes #12742
Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>

* updating DIRECTORY.md

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

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

---------

Signed-off-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>
Co-authored-by: Lim, Lukaz Wei Hwang <lukaz.wei.hwang.lim@intel.com>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-14 04:42:11 +03:00
S Sajeev
6e4d1b3765 Physics orbital_transfer_work (#12728)
* Added iterative solution for power calculation

* Added iterative solution for power calculation

* Added iterative solution for power calculation

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

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

* Added iterative solution for power calculation fixes #12709

* Added iterative solution for power calculation  FIXES NUMBER 12709

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

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

* Escape velocity is the minimum speed an object must have to break free from a celestial body's gravitational pull without further propulsion.
Takes input as the Mass of the Celestial body (M) and Radius fron the center of mass (M)

* Fix: added header comment to escape_velocity.py

* Trigger re-PR with a minor change

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

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

* Fix: resolve Ruff linter errors and add Wikipedia reference

* Add: work done calculation for orbital transfer between orbits

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

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

* Update escape_velocity.py

* Delete maths/power_using_iteration.py

* Update and rename workdone.py to orbital_transfer_work.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-05-13 11:14:05 +02:00
pre-commit-ci[bot]
ee3a1732e0 [pre-commit.ci] pre-commit autoupdate (#12736)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.8...v0.11.9)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-12 19:59:33 +02:00
Christian Clauss
f721e598e5 Add a proper shebang line to scripts/validate_filenames.py (#12733) 2025-05-12 14:33:33 +03:00
Christian Clauss
485f688d06 Add PEP723 header to scripts/validate_solutions.py (#12731)
Enable `uv run scripts/validate_solutions.py` or `pipx run scripts/validate_solutions.py`
* https://peps.python.org/pep-0723
* https://docs.astral.sh/uv/guides/scripts/#declaring-script-dependencies
2025-05-12 13:52:27 +03:00
Christian Clauss
088c74e840 Delete empty source directory (#12730) 2025-05-12 12:45:53 +02:00
Christian Clauss
1ea05feffe Prep for Python 3.14: Rename compression to data_compression (#12725)
* Prep for Python 3.14: Rename compression to data_compression

* updating DIRECTORY.md

---------

Co-authored-by: cclauss <cclauss@users.noreply.github.com>
2025-05-12 12:59:19 +03:00
S Sajeev
95fb181f5a Add escape velocity calculator using standard physics formula (#12721)
* Added iterative solution for power calculation

* Added iterative solution for power calculation

* Added iterative solution for power calculation

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

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

* Added iterative solution for power calculation fixes #12709

* Added iterative solution for power calculation  FIXES NUMBER 12709

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

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

* Escape velocity is the minimum speed an object must have to break free from a celestial body's gravitational pull without further propulsion.
Takes input as the Mass of the Celestial body (M) and Radius fron the center of mass (M)

* Fix: added header comment to escape_velocity.py

* Trigger re-PR with a minor change

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

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

* Fix: resolve Ruff linter errors and add Wikipedia reference

* Delete maths/power_using_iteration.py

* Test doctests

* Update escape_velocity.py

* Update escape_velocity.py

* Update escape_velocity.py

* Update escape_velocity.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-05-10 23:43:39 +03:00
robohie
131765574f Fix error messages for horizontal_projectile_motion.py (#12722)
* Update horizontal_projectile_motion.py

This commit is about logic of this program. Changes made aim to allow a good understanding of what is done.

* Update horizontal_projectile_motion.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-10 23:18:02 +03:00
Alfredo Hernandez Baeza
47a44abe23 Improve longest_common_substring.py (#12705)
* Update longest_common_substring.py

- Combined the ans_index and ans_length into a single tuple to track the best match (position + length) more cleanly.

- Early exit for empty strings.

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

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

* Update longest_common_substring.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>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-10 14:57:43 +03:00
robohie
59c3c8bbf3 Add N Input AND Gate (#12717)
* Update and_gate.py

J'ai nourri ce programme en ajoutant une porte And à n entrées.

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

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

* Update and_gate.py

Commentaires en anglais

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

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

* Update and_gate.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-05-10 14:47:22 +03:00
NidhaNureen
a728cc96ab Added/Improved doctests for lowest_common_ancestor.py (#12673)
* added doctests to functions in lowest_common_ancestor.py

* fixed doctests to be less excessive

* Update lowest_common_ancestor.py

* Update lowest_common_ancestor.py

* Update lowest_common_ancestor.py

* Update lowest_common_ancestor.py

* Update lowest_common_ancestor.py

* Update lowest_common_ancestor.py

---------

Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
2025-05-10 14:32:45 +03:00
Mindaugas
b720f24b89 Add solution for the Euler project problem 95. (#12669)
* Add documentation and tests for the Euler project problem 95 solution.

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* 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

* [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

* [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

* [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

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

* 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

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

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

* Update sol1.py

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

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

* 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-05-10 14:13:07 +03:00
Mindaugas
d9d56b1046 Add solution for the Euler project problem 345 (#12666)
* Add solution for the Euler project problem 345.

* Update sol1.py

* Update sol1.py

* 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

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

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

---------

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-05-06 22:49:59 +03:00
pre-commit-ci[bot]
7ed7f042fe [pre-commit.ci] pre-commit autoupdate (#12708)
* [pre-commit.ci] pre-commit autoupdate

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

* 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-05-05 19:23:31 +01:00
Mindaugas
40f4c510b6 Add solution for the Euler problem 190 (#12664)
* Add solution for the Euler project problem 164.

* Add solution for the Euler project problem 190.

* Delete project_euler/problem_164/sol1.py

* Delete project_euler/problem_164/__init__.py

* Update sol1.py

* Update sol1.py

* Update sol1.py

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

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

---------

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-05-05 10:14:56 +03:00
Mindaugas
145879b8b2 Add solution for the Euler project problem 164. (#12663)
* Add solution for the Euler project problem 164.

* Update sol1.py

* Update sol1.py

* 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

---------

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-05-05 10:00:32 +03:00
pre-commit-ci[bot]
0a3a965347 [pre-commit.ci] pre-commit autoupdate (#12692)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.11.6 → v0.11.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.6...v0.11.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-04-28 19:55:57 +02:00
dependabot[bot]
29afed0df6 Bump astral-sh/setup-uv from 5 to 6 (#12683)
* Bump astral-sh/setup-uv from 5 to 6

Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 5 to 6.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v5...v6)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* uv run pytest --ignore=web_programming/fetch_anime_and_play.py

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2025-04-25 08:30:42 +02:00
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