Skip to content

[pull] master from TheAlgorithms:master#53

Open
pull[bot] wants to merge 1870 commits intow3dg:masterfrom
TheAlgorithms:master
Open

[pull] master from TheAlgorithms:master#53
pull[bot] wants to merge 1870 commits intow3dg:masterfrom
TheAlgorithms:master

Conversation

@pull
Copy link

@pull pull bot commented Oct 24, 2020

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dependabot bot and others added 15 commits August 25, 2025 21:22
…3.2 to 4.9.4.0 (#6498)

* chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin

Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.3.2 to 4.9.4.0.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.9.3.2...spotbugs-maven-plugin-4.9.4.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.4.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* fix: exclude `SF_SWITCH_FALLTHROUGH`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com>
…6504)

* Migrate recursive reverse string method and tests to ReverseString

- Moved recursive reverse method from ReverseStringRecursive.java to ReverseString.java
- Moved tests from ReverseStringRecursiveTest.java to ReverseStringTest.java
- Deleted old ReverseStringRecursive files

* Fix formatting for ReverseStringTest.java as per clang-format linter
…4.0 to 4.9.4.1 (#6515)

chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin

Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.4.0 to 4.9.4.1.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.9.4.0...spotbugs-maven-plugin-4.9.4.1)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…o 7.6.14 (#6517)

chore(deps): bump com.mebigfatguy.fb-contrib:fb-contrib

Bumps [com.mebigfatguy.fb-contrib:fb-contrib](https://github.com/mebigfatguy/fb-contrib) from 7.6.13 to 7.6.14.
- [Commits](mebigfatguy/fb-contrib@v7.6.13...v7.6.14)

---
updated-dependencies:
- dependency-name: com.mebigfatguy.fb-contrib:fb-contrib
  dependency-version: 7.6.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
* Added-> DisjointUnion Set by Size

* Add tests for DisjointSetUnionBySize

---------

Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
Co-authored-by: DenizAltunkapan <DenizAltunkapan@users.noreply.github.com>
…6519)

Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  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>
…ows (#6520)

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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…o 2025-08-25-18-17-39 (#6523)

chore(deps): bump gitpod/workspace-java-21

Bumps gitpod/workspace-java-21 from 2025-06-18-16-47-14 to 2025-08-25-18-17-39.

---
updated-dependencies:
- dependency-name: gitpod/workspace-java-21
  dependency-version: 2025-08-25-18-17-39
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4.1 to 4.9.4.2 (#6524)

chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin

Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.4.1 to 4.9.4.2.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.9.4.1...spotbugs-maven-plugin-4.9.4.2)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
… 3.5.3 to 3.5.4 (#6527)

chore(deps): bump org.apache.maven.plugins:maven-surefire-plugin

Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4.2 to 4.9.5.0 (#6528)

chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin

Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.4.2 to 4.9.5.0.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.9.4.2...spotbugs-maven-plugin-4.9.5.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.5.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* adding Suffix Array Implementation

* adding test for Suffix Array

* patch: lint fix in SuffixArray.java

* patch: lint fix in SuffixArrayTest.java

* fix: private constructor update

* patch: lint fix in suffix array impl

* fix: lint issue line blankspace removal

* fix: checkstype issue

* fix: lint format issue

* Update DIRECTORY.md
…5.0 to 4.9.6.0 (#6531)

chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin

Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.9.5.0 to 4.9.6.0.
- [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases)
- [Commits](spotbugs/spotbugs-maven-plugin@spotbugs-maven-plugin-4.9.5.0...spotbugs-maven-plugin-4.9.6.0)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-maven-plugin
  dependency-version: 4.9.6.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GziXnine and others added 30 commits January 13, 2026 23:04
* feat: implement Smooth Sort algorithm with detailed JavaDoc and test class

* style: format LEONARDO array for improved readability with clang-format

* feat(sorts): add TournamentSort (winner-tree)

* test: add unit test for null array handling in TournamentSort

---------

Co-authored-by: Ahmed Allam <60698204+AllamF5J@users.noreply.github.com>
Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
Co-authored-by: Oleksandr Klymenko <19151554+alxkm@users.noreply.github.com>
* feat: implement Smooth Sort algorithm with detailed JavaDoc and test class

* style: format LEONARDO array for improved readability with clang-format

* feat(sorts): add TournamentSort (winner-tree)

* test: add unit test for null array handling in TournamentSort

* feat(search): add rotated binary search

* test: add unit test for handling middle element in right sorted half of rotated array

---------

Co-authored-by: Ahmed Allam <60698204+AllamF5J@users.noreply.github.com>
…2 to 7.7.3 (#7211)

chore(deps-dev): bump com.mebigfatguy.fb-contrib:fb-contrib

Bumps [com.mebigfatguy.fb-contrib:fb-contrib](https://github.com/mebigfatguy/fb-contrib) from 7.7.2 to 7.7.3.
- [Commits](mebigfatguy/fb-contrib@v7.7.2...v7.7.3)

---
updated-dependencies:
- dependency-name: com.mebigfatguy.fb-contrib:fb-contrib
  dependency-version: 7.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: implement Smooth Sort algorithm with detailed JavaDoc and test class

* style: format LEONARDO array for improved readability with clang-format

* feat: add MiddleOfLinkedList class and corresponding test cases

* docs: update documentation for MiddleOfLinkedList class

* test: refactor MiddleOfLinkedListTest to improve readability and assertions

* test: refactor MiddleOfLinkedListTest for improved null safety and readability

---------

Co-authored-by: Ahmed Allam <60698204+AllamF5J@users.noreply.github.com>
* docs: add Javadoc to FibonacciSeries

* fix: make small adjustment

---------

Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
…earch (#7216)

Added input validation and clarify sorted array rrequirement in Binary Search
* feat: added Bell Numbers algorithm using Aitken's Array

* style: applied clang-format fixes
Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
* Add distance between two points algorithm

* Create DistanceBetweenTwoPointsTest.java

* DistanceBetweenTwoPoints.java

* Fix test file package and project structure

* Delete src/test/java/com/thealgorithms/DistanceBetweenTwoPointsTest.java

* Apply clang-format compliant formatting

* Apply clang-format

---------

Co-authored-by: a <19151554+alxkm@users.noreply.github.com>
…3 to 7.7.4 (#7222)

* chore(deps-dev): bump com.mebigfatguy.fb-contrib:fb-contrib

Bumps [com.mebigfatguy.fb-contrib:fb-contrib](https://github.com/mebigfatguy/fb-contrib) from 7.7.3 to 7.7.4.
- [Commits](mebigfatguy/fb-contrib@v7.7.3...v7.7.4)

---
updated-dependencies:
- dependency-name: com.mebigfatguy.fb-contrib:fb-contrib
  dependency-version: 7.7.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* fix: supporess new warnings

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com>
* fix: prevent duplicate auth header in GitHub Actions workflow

* chore: remove Korean README file
…7243)

Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.6 to 3.27.7.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](assertj/assertj@assertj-build-3.27.6...assertj-build-3.27.7)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.7
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* docs: Add comprehensive documentation to BinarySearch algorithm

- Added detailed JavaDoc with @param, @return, @throws tags
- Included step-by-step algorithm walkthrough example
- Added inline comments explaining each code section
- Documented time and space complexity analysis
- Provided concrete usage examples with expected outputs
- Explained edge cases and overflow prevention technique

* style: Apply proper Java formatting to BinarySearch

- Fixed line length to meet style guidelines
- Applied proper JavaDoc formatting
- Corrected indentation and spacing
- Ensured compliance with project formatting standards

* fix: correct Javadoc formatting and add missing newline at EOF

- Fix Javadoc structure with proper tag ordering (description before @params)
- Remove incorrect @throws tag (method returns -1, doesn't throw)
- Format algorithm steps as proper HTML ordered list
- Move complexity analysis before @param tags
- Add missing newline at end of file
- Fix example code to use instance method call
….0 (#7251)

Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 13.0.0 to 13.1.0.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](checkstyle/checkstyle@checkstyle-13.0.0...checkstyle-13.1.0)

---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-version: 13.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

* first commit

* Running KMPTest and RabinKarpTest with fixed formatting

* now build failed error resolved

* now build failed error resolved 2

---------

Co-authored-by: Divyansh Saxena <divyanshsaxena@gmail.com>
Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
…from 3.14.1 to 3.15.0 (#7254)

chore(deps-dev): bump org.apache.maven.plugins:maven-compiler-plugin

Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.14.1 to 3.15.0.
- [Release notes](https://github.com/apache/maven-compiler-plugin/releases)
- [Commits](apache/maven-compiler-plugin@maven-compiler-plugin-3.14.1...maven-compiler-plugin-3.15.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-compiler-plugin
  dependency-version: 3.15.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…tenance overhead (#7256)

refactor: remove duplicate algorithm implementations

Removed the following duplicate implementations:
- searches/PerfectBinarySearch.java (duplicate of IterativeBinarySearch)
- searches/SortOrderAgnosticBinarySearch.java (duplicate of OrderAgnosticBinarySearch)
- strings/LongestPalindromicSubstring.java (duplicate of dynamicprogramming version)
- strings/ValidParentheses.java (duplicate of stacks version)
- others/cn/HammingDistance.java (duplicate - strings version handles text)
- others/NewManShanksPrimeTest.java (orphan test in wrong package)

Updated DIRECTORY.md to reflect the changes.

Fixes #7253

Co-authored-by: Ahmed Allam <60698204+AllamF5J@users.noreply.github.com>
….0 (#7259)

Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 13.1.0 to 13.2.0.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](checkstyle/checkstyle@checkstyle-13.1.0...checkstyle-13.2.0)

---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-version: 13.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
### Summary
This PR makes small readability and maintainability improvements to the algorithm implementation.

### Changes
- Removed a redundant `n < 0` validation check since the method contract already ensures valid `n`
- Replaced `current.remove(current.size() - 1)` with `current.removeLast()` to better express backtracking intent

### Rationale
- Simplifies input validation without changing behavior
- Uses the `Deque` API to make the backtracking step clearer and less error-prone

### Impact
- No change in algorithm logic or time/space complexity
- Output remains identical

Co-authored-by: Swati Vusurumarthi <swativs869@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.