Skip to content

Conversation

Tarannum9623
Copy link

@Tarannum9623 Tarannum9623 commented Oct 5, 2025

Searching in a rotated sorted array:

  • [x ] Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

pre-commit-ci bot and others added 30 commits August 26, 2025 15:32
* [pre-commit.ci] pre-commit autoupdate

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

* Update word_break.py

* Update word_break.py

* Update word_break.py

* Update word_break.py

* Update word_break.py

* Update covid_stats_via_xpath.py

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

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

* Update pyproject.toml

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

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

* Update pyproject.toml

* Update pyproject.toml

* Update covid_stats_via_xpath.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 <[email protected]>
* Add new solution for the euler project problem 9 - precompute the squares.

* Update sol4.py

* updating DIRECTORY.md

* Update sol4.py

* Update sol4.py

* Update sol4.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
* Create cyclic_sort.py

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

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

* Update cyclic_sort.py

* updating DIRECTORY.md

* Update cyclic_sort.py

* Update cyclic_sort.py

* Update cyclic_sort.py

* Update cyclic_sort.py

* Update cyclic_sort.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
…ation (TheAlgorithms#9295)

* enhance knapsack problem

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

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

* wei/refactor code

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

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

* Update test_knapsack.py

* Update knapsack.py

* Update test_knapsack.py

* Update knapsack.py

* Update knapsack.py

* Update knapsack.py

* Update knapsack.py

* Update knapsack.py

* Update test_knapsack.py

---------

Co-authored-by: weijiang <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
* added coordinate_compression algorithm

* added coordinate_compression & doctest

* adding return type hints and utilized enumerate

* adding exmaple usage in main function

* added type hints, for list and dict

* updating DIRECTORY.md

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

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

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

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update other/coordinate_compression.py

Co-authored-by: Christian Clauss <[email protected]>

* Update coordinate_compression.py

* Create coordinate_compression.py

* updating DIRECTORY.md

* Delete other/coordinate_compression.py

* updating DIRECTORY.md

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

* Update coordinate_compression.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update README.md

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update blockchain/README.md

Co-authored-by: Tianyi Zheng <[email protected]>

* Update README.md

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: Tianyi Zheng <[email protected]>
* algorithm to find unique prime factors

* Update prime_factors.py

* Update prime_factors.py

* Update prime_factors.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
* fixed_incorrect_test_combination_sum

* reverting fn arg

* ruff

* Update combination_sum.py

* Update combination_sum.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
* Generate parantheses iterative

* Generate parantheses iterative

* Generating parantheses code using iterative approach

* Update generate_parentheses_iterative.py

* updating DIRECTORY.md

* Update generate_parentheses_iterative.py

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

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

* Update generate_parentheses_iterative.py

* Update generate_parentheses_iterative.py

* Update generate_parentheses_iterative.py

---------

Co-authored-by: nightmare10123 <[email protected]>
Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Fixes bug in PriorityQueue Algorithm; Fixes syntax in code for array.

* Update dijkstra_algorithm.py

* Update dijkstra_algorithm.py

* Update dijkstra_algorithm.py

* Update dijkstra_algorithm.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
* 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>
* Adding doctests in simpson_rule.py

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

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

* Update stock_span_problem.py

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

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

* Update subset_generation.py

* Update subset_generation.py

* Update data_structures/stacks/stock_span_problem.py

Co-authored-by: Christian Clauss <[email protected]>

* Update stock_span_problem.py

* Update data_structures/stacks/stock_span_problem.py

Co-authored-by: Christian Clauss <[email protected]>

* Update stock_span_problem.py

* Update stock_span_problem.py

* updating DIRECTORY.md

* Update stock_span_problem.py

* Update stock_span_problem.py

* Update stock_span_problem.py

* Update stock_span_problem.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
…rithms#11553)

* Seperate slow_solution and solution

* Add performance benchmark

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

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

* Fix issues

* Update sol1.py

* Update sol1.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
…gorithms#11605)

* Add new test for bucket sort algorithm in sorts/bucket_sort.py

* Update fractional_knapsack.py

* Update matrix_class.py

* Update bucket_sort.py

* Update bucket_sort.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
* 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 <[email protected]>
* test: Add unit tests

* test: Add successful tests in binaree_tree_path_sum

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

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

* Update binary_tree_path_sum.py

* Update binary_tree_path_sum.py

* Update binary_tree_path_sum.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
* Update README.md

Add emojis for enhanced visual appeal and readability in README .

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

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

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
…2372)

* Adding a 3D plot to the k-means clustering algorithm

* Update k_means_clust.py

* Update k_means_clust.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
* Create stalin_sort.py

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

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

* Update stalin_sort.py

* updating DIRECTORY.md

* Update stalin_sort.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
Co-authored-by: MaximSmolskiy <[email protected]>
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.10 → v0.12.11](astral-sh/ruff-pre-commit@v0.12.10...v0.12.11)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…thms#12946)

* Fix: is_palindrome_recursive logic for 2-char strings

* Update palindrome.py

* Update palindrome.py

* Update palindrome.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[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 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <[email protected]>
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.12.12](astral-sh/ruff-pre-commit@v0.12.11...v0.12.12)

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>
updates:
- [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.1](pre-commit/mirrors-mypy@v1.17.1...v1.18.1)

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>
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.0 → v0.13.1](astral-sh/ruff-pre-commit@v0.13.0...v0.13.1)
- [github.com/pre-commit/mirrors-mypy: v1.18.1 → v1.18.2](pre-commit/mirrors-mypy@v1.18.1...v1.18.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added edit_distance test cases

* Update edit_distance.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
…heAlgorithms#12991)

* Add doctests for cross function. Contributes to TheAlgorithms#9943

* Update sudoku_solver.py

---------

Co-authored-by: Maxim Smolskiy <[email protected]>
pre-commit-ci bot and others added 2 commits September 29, 2025 20:30
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.13.1 → v0.13.2](astral-sh/ruff-pre-commit@v0.13.1...v0.13.2)

* ci: autoupdate_schedule: monthly

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <[email protected]>
@Tarannum9623 Tarannum9623 requested a review from cclauss as a code owner October 5, 2025 20:10
@cclauss
Copy link
Member

cclauss commented Oct 5, 2025

Please rebase.

@Tarannum9623
Copy link
Author

Please rebase.

Can you tell me how can I rebase and which branch I should have raised pull request? It will be very helpful.

@algorithms-keeper algorithms-keeper bot added tests are failing Do not merge until tests pass and removed tests are failing Do not merge until tests pass labels Oct 5, 2025
@cclauss cclauss deleted the branch TheAlgorithms:Python-3.14 October 7, 2025 16:23
@cclauss cclauss closed this Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.