forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from TheAlgorithms:master #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
1,832
commits into
w3dg:master
Choose a base branch
from
TheAlgorithms:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+132,264
−19,437
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc36124 to
d63f470
Compare
13857d1 to
936861c
Compare
4601d1f to
ca2e207
Compare
e7c6a41 to
a850509
Compare
43a8e4f to
0fd737e
Compare
49378d6 to
ce151a8
Compare
Co-authored-by: DenizAltunkapan <DenizAltunkapan@users.noreply.github.com>
* testing: improving GenerateSubsetsTest * testing: change List to more common Iterable --------- Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
…ottom-Up DP) Implementations in Java along with their corresponding Tests (#6425) * feat: Add 0/1 Knapsack and its tabulation implementation with their corresponding tests * feat: Add 0/1 Knapsack and its tabulation implementation with their corresponding tests * feat: Add 0/1 Knapsack and its tabulation implementation with their corresponding tests * Feat:add 0/1knapsack and 0/1knapsacktabulation along with their tests * Feat:add 0/1knapsack and 0/1knapsacktabulation along with their tests * Feat:add 0/1knapsack and 0/1knapsacktabulation along with their tests --------- Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
testing: refactor to ParameterizedTest PrefixEvaluatorTest Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
Co-authored-by: alxkm <alxkm@users.noreply.github.com>
testing: improve QueueByTwoStacksTest
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit-framework) from 5.13.3 to 5.13.4. - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r5.13.3...r5.13.4) --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-version: 5.13.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>
* testing: improve CircularBufferTest * style: redundant whitespace --------- Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
testing: improve SortStackTest Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
testing: improve StackArrayTest
* testing: improve test coverage CursorLinkedListTest * style: fix checkstyle formatting
* testing: improve test coverage StackOfLinkedListTest * testing: fix spotbugs
added program for abundant number
added program for evil number
* Add One-Time Pad Cipher implementation in Java * Add One-Time Pad Cipher implementation (fixed) * Add ThreadedBinaryTree with in-order traversal and tests * feat: add threaded binary tree implementation and tests * fix: remove redundant null check for SpotBugs compliance
….0 (#7147) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 12.1.2 to 12.2.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-12.1.2...checkstyle-12.2.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 12.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>
…o 2025-11-14-10-05-32 (#7148) chore(deps): bump gitpod/workspace-java-21 Bumps gitpod/workspace-java-21 from 2025-10-06-13-14-25 to 2025-11-14-10-05-32. --- updated-dependencies: - dependency-name: gitpod/workspace-java-21 dependency-version: 2025-11-14-10-05-32 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Snell's Law implementation for refraction angle * Add tests for Snell's Law calculations * Update documentation with reference link to Snell's Law Added a reference link to Snell's Law in the documentation. * Prevent instantiation of SnellLaw class Make SnellLaw class non-instantiable by adding a private constructor. * Rename SnellsLawTest to SnellLawTest * Refactor SnellLawTest for clarity and accuracy * Rename SnellsLaw.java to SnellLaw.java * Refactor SnellLawTest with additional assertions * Refactor SnellLaw class constructor and error handling Refactor SnellLaw constructor and error message formatting. * Fix missing newline at end of SnellLawTest.java Ensure that the SnellLawTest class has a newline at the end of the file. * Simplify assertions in SnellLawTest * Simplify exception throwing for total internal reflection
… 7.7.2 (#7153) chore(deps): bump com.mebigfatguy.fb-contrib:fb-contrib Bumps [com.mebigfatguy.fb-contrib:fb-contrib](https://github.com/mebigfatguy/fb-contrib) from 7.7.1 to 7.7.2. - [Commits](https://github.com/mebigfatguy/fb-contrib/commits/v7.7.2) --- updated-dependencies: - dependency-name: com.mebigfatguy.fb-contrib:fb-contrib dependency-version: 7.7.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>
…7155) Add time and space complexity comments for specific sorting algorithms Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
* Add unit tests for graph algorithms (BFS, DFS, Dijkstra, Bellman-Ford) #7133 - Created BellmanFordTest.java with 10 test methods covering various graph scenarios - Created ConnectedComponentTest.java with 15 test methods for DFS-based component counting - Enhanced MatrixGraphsTest.java with additional BFS/DFS test cases - Enhanced DijkstraAlgorithmTest.java with comprehensive shortest path tests Fixes #7133 * fix: format files using clang * fix: removing my changes on pull_request_template --------- Co-authored-by: prashantdubeypng <vinoddubey6059@gmail.com>
…7154) Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.20.0 to 5.21.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.20.0...v5.21.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-version: 5.21.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> Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
) Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v4...v5) --- updated-dependencies: - dependency-name: actions/cache 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>
* Add Z-Algorithm (string pattern matching) with tests * Add Z-Algorithm (string pattern matching) with tests * Add Z-Algorithm (string pattern matching) with tests * Fix checkstyle errors for ZAlgorithm * Fix: clang-format and checkstyle compliance for ZAlgorithm
* feat: BinaryTreeToString.java Added with tests * fix: javadoc added to BinaryTreeToString * fix: link to leetcode added
added program for lucky number
….0 (#7167) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 12.2.0 to 12.3.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-12.2.0...checkstyle-12.3.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 12.3.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>
* [FEAT] Add Thin Lens formula for ray optics * [CI] Re-run clang-format checks * [CI] Re-run checks after rebase * [STYLE] Apply clang-format to ThinLensTest --------- Co-authored-by: Koushik Sai <nyamathabadkoushik@gmail.com>
* commit1 * Fix clang-format spacing in array declarations
* Add additional edge cases to GCD unit tests * Rename GCD test methods and add descriptive names * Fix formatting in GCD tests --------- Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
* Implement LengthOfLastWord algorithm in strings package * Add JUnit tests for LengthOfLastWord algorithm * style: fix import order and spacing for clang-format
* Add recursive factorial implementation with tests * [STYLE] Apply clang-format * Move recursive factorial to recursion package and remove duplicate * Move recursive factorial to recursion package and remove duplicate * Apply clang-format to factorial recursion tests * Apply clang-format to factorial recursion tests --------- Co-authored-by: Koushik Sai <nyamathabadkoushik@gmail.com> Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
* Add immutable HashMap implementation * Add immutable HashMap implementation * Applied clang-format --------- Co-authored-by: Koushik Sai <nyamathabadkoushik@gmail.com>
* Add StochasticMatrix utility class This class provides methods to check if a matrix is row-stochastic or column-stochastic, ensuring all elements are non-negative and the sums of rows or columns equal 1. * Change package from maths to matrix Updated package declaration for StochasticMatrix class. * Change package declaration in StochasticMatrixTest * Delete src/test/java/com/thealgorithms/StochasticMatrixTest.java * Refactor matrix initialization for test cases * Fix formatting of matrix initialization in tests * Remove unnecessary newline in StochasticMatrix * Add import statement for JUnit in StochasticMatrixTest * Add additional assertions to StochasticMatrixTest * Clean up import statements in StochasticMatrixTest Removed unused import statements for cleaner code. * Reorder import statements in StochasticMatrixTest * Remove unused import assertThrows from StochasticMatrixTest Removed unused import for assertThrows.
* Added 0/1 Knapsack Algorithm using Dynamic Programming in Java * Fix Checkstyle whitespace issues in Knapsack.java * Formatted Knapsack.java to pass linter and added 0/1 Knapsack algorithm * Formatted Knapsack.java to pass linter and added 0/1 Knapsack algorithm * Formatted Knapsack.java to pass linter and added 0/1 Knapsack algorithm * Formatted Knapsack.java to pass linter and added 0/1 Knapsack algorithm --------- Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
Co-authored-by: DenizAltunkapan <DenizAltunkapan@users.noreply.github.com>
* Add checklist item for test class inclusion * Update pull request template for algorithm tests
….1 (#7188) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 12.3.0 to 12.3.1. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-12.3.0...checkstyle-12.3.1) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 12.3.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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 : )