Skip to content
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

Related to issue number #5164 Class "AllPathsFromSourceToTarget" redesigned. #5205

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
40cd4d8
Bump gitpod/workspace-java-17 from 2023-08-30-14-07-38 to 2024-03-31-…
dependabot[bot] Apr 2, 2024
22310de
Cleaned up code for some packages (#5094)
katerynakanivets Apr 2, 2024
c53f178
Implement Parentheses Generator (#5096)
sozelfist Apr 5, 2024
ab094ef
chore: generate coverage report and upload it to codecov (#5098)
vil02 Apr 6, 2024
295ac4b
Update `codecov/codecov-action` to `v4` (#5100)
vil02 Apr 6, 2024
90704d7
fix: update `clang-format` tag (#5095)
vil02 Apr 8, 2024
f490b59
docs: add codecov badge (#5099)
vil02 Apr 8, 2024
4697b87
chore: update maven dependencies (#5101)
vil02 Apr 8, 2024
91cdf04
Chore(deps): bump gitpod/workspace-java-17 from 2024-03-31-14-01-15 t…
dependabot[bot] Apr 9, 2024
f39bb8f
Chore(deps): bump DoozyX/clang-format-lint-action from 0.16.2 to 0.17…
dependabot[bot] Apr 12, 2024
7201dc7
Added tests for NumberOfDigits (#5107)
marysiuniq Apr 13, 2024
05626f7
Chore(deps): bump gitpod/workspace-java-17 from 2024-04-07-21-39-34 t…
dependabot[bot] Apr 16, 2024
8129686
Added tests for `FactorialRecursion` (#5109)
marysiuniq Apr 20, 2024
ac598e2
Remove unused import. (#5113)
marysiuniq Apr 21, 2024
089b1f7
Chore(deps): bump gitpod/workspace-java-17 from 2024-04-15-14-41-42 t…
dependabot[bot] Apr 23, 2024
7a42f68
chore: configure `checkstyle` (#5110)
vil02 Apr 24, 2024
6de154d
tests: add tests of `Mode` (#5104)
vil02 Apr 26, 2024
de18d0d
style: enable `EmptyStatement` (#5120)
vil02 Apr 26, 2024
4bb6455
chore: configure SpotBugs (#5122)
vil02 Apr 28, 2024
b075c19
Chore(deps): bump gitpod/workspace-java-17 from 2024-04-16-12-16-24 t…
dependabot[bot] Apr 30, 2024
2513ccd
style: include `IM_AVERAGE_COMPUTATION_COULD_OVERFLOW` (#5131)
vil02 May 1, 2024
fd65892
chore: add `maven` to dependabot (#5123)
vil02 May 1, 2024
06a284f
style: enable `ModifierOrder` in checkstyle (#5132)
marysiuniq May 1, 2024
f64bc3c
style: include `UC_USELESS_OBJECT` (#5127)
vil02 May 1, 2024
cdc320a
Chore(deps): bump com.puppycrawl.tools:checkstyle from 9.3 to 10.16.0…
dependabot[bot] May 1, 2024
032c288
Chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from…
dependabot[bot] May 1, 2024
ede3e46
Chore(deps): bump gitpod/workspace-java-17 from 2024-04-29-07-29-58 t…
dependabot[bot] May 2, 2024
1e2d7e9
style: enable `ConstantName` in checkstyle (#5139)
marysiuniq May 2, 2024
b3903f5
style: enable `RedundantModifier` in checkstyle (#5140)
vil02 May 3, 2024
dda3c9c
Refactor Levenshtein distance implementation (#5138)
sozelfist May 4, 2024
6bde5d7
chore: configure SpotBugs plugin `fb-contrib` (#5126)
vil02 May 4, 2024
5d00889
fix: handle empty inputs in `CircleSort` (#5121)
vil02 May 5, 2024
dc47e0a
style: include `ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD` (#5129)
vil02 May 5, 2024
414835d
style: enable `AvoidStarImport` in checkstyle (#5141)
vil02 May 5, 2024
bfb27ee
style: enable `ArrayTypeStyle` in checkstyle (#5145)
vil02 May 6, 2024
ff5267d
Chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin from 4.8.…
dependabot[bot] May 7, 2024
030bb91
chore: configure SpotBugs plugin `find-sec-bugs` (#5144)
vil02 May 7, 2024
d3bb691
style: enable `HideUtilityClassConstructor` in checkstyle (#5147)
vil02 May 8, 2024
d2ddec5
style: include `NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION` (#5149)
vil02 May 8, 2024
ee6924a
style: include `PATH_TRAVERSAL_IN` (#5148)
vil02 May 9, 2024
7bff82f
style: include `LEST_LOST_EXCEPTION_STACK_TRACE` (#5150)
vil02 May 9, 2024
27c0978
style: include `VA_FORMAT_STRING_USES_NEWLINE` (#5151)
vil02 May 9, 2024
52f15b2
style: include `RV_RETURN_VALUE_IGNORED` (#5152)
vil02 May 9, 2024
bbe4a02
style: enable `FinalClass` in checkstyle (#5154)
CodaBlurd May 11, 2024
cb401fe
chore: configure PMD (#5155)
vil02 May 11, 2024
cf6c87c
style: make `SubsetCount` a proper utility (#5153)
vil02 May 11, 2024
319d514
refactor: cleanup `DudeneyNumber` (#5156)
vil02 May 12, 2024
5703be5
style: enable EqualsHashCode in checkstyle (#5157)
CodaBlurd May 12, 2024
bbef89c
refactor: simplify logic of `Point::equals` in `KDTree` (#5158)
CodaBlurd May 12, 2024
f8e62fb
Chore(deps): bump gitpod/workspace-java-17 from 2024-04-29-23-03-42 t…
dependabot[bot] May 14, 2024
0f42e99
style: enabled `InnerAssignment` in checkstyle (#5162)
CodaBlurd May 16, 2024
bf9d0ed
fix: handle constant inputs in `LongestIncreasingSubsequence::findLIS…
vil02 May 17, 2024
d77d901
style: enable compiler warnings and treat them as errors (#5165)
vil02 May 19, 2024
5ee98ee
chore: migrate to java 21 (#5163)
vil02 May 19, 2024
8466219
style: do not suppress `serial` (#5168)
vil02 May 20, 2024
324969f
style: enable `OverrideBothEqualsAndHashcode` like checks (#5159)
vil02 May 20, 2024
8be8b95
style: do not suppress `this-escape` (#5166)
vil02 May 20, 2024
1607421
Enabled LocalFinalVariableName in Checkstyle (#5172)
CodaBlurd May 24, 2024
44ce6e7
style: enable `StaticVariableName` in checkstyle (#5173)
vaibhav9t1 May 25, 2024
9eaa2bb
style: enable `MultipleVariableDeclarations` in checkstyle (#5175)
vaibhav9t1 May 25, 2024
37c2a96
style: enable `MissingSwitchDefault` in checkstyle (#5179)
BamaCharanChhandogi May 26, 2024
ea4dc15
style: do not suppress `try` (#5167)
vil02 May 26, 2024
295e743
style: enable `MethodName` in CheckStyle (#5182)
CodaBlurd May 27, 2024
70c1d97
style: include `SPP_TOSTRING_ON_STRING` (#5183)
vil02 May 27, 2024
92887a1
style: include `NAB_NEEDLESS_BOXING_PARSE` (#5184)
vil02 May 28, 2024
33a3484
Chore(deps-dev): bump org.assertj:assertj-core from 3.25.3 to 3.26.0 …
dependabot[bot] May 28, 2024
23ed119
Chore(deps): bump gitpod/workspace-java-21 from 2024-05-15-13-36-34 t…
dependabot[bot] May 28, 2024
81cb09b
Chore(deps): bump com.puppycrawl.tools:checkstyle from 10.16.0 to 10.…
dependabot[bot] May 28, 2024
25d711c
style: enable `LocalVariableName` in CheckStyle (#5191)
cpu-pixel May 28, 2024
1a98ebe
style: enable `MissingSwitchDefault` in CheckStyle (#5188)
vil02 May 28, 2024
2cda944
style: include `ENMI_EQUALS_ON_ENUM` (#5189)
vil02 May 28, 2024
d2bfb10
style: include `LII_LIST_INDEXED_ITERATING` (#5190)
vil02 May 28, 2024
a6e873d
style: enable `MemberName` in checkstyle (#5193)
cpu-pixel May 29, 2024
2568b96
Adding class for generating all subsequences from a given List (#5194)
alxkm May 30, 2024
c42b1c9
style: enable `ParameterName` in CheckStyle. (#5196)
CodaBlurd May 31, 2024
5e4db7b
style: include `SS_SHOULD_BE_STATIC` (#5198)
vil02 Jun 1, 2024
2e387fe
style: include `IMC_IMMATURE_CLASS_VAR_NAME` (#5197)
vil02 Jun 1, 2024
f3db699
Chore(deps): bump gitpod/workspace-java-21 from 2024-05-27-17-11-15 t…
dependabot[bot] Jun 4, 2024
493942e
style: include `IT_NO_SUCH_ELEMENT` (#5200)
vil02 Jun 4, 2024
440f3ce
style: include `MAC_MANUAL_ARRAY_COPY` (#5199)
vil02 Jun 4, 2024
843085a
Cleanup Class AllPathsFromSourceToTarget
JeysiStrokk Jun 5, 2024
400c8a2
Cleanup class AllPathsFromSourceToTarget
JeysiStrokk Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/java/.devcontainer/base.Dockerfile

# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
ARG VARIANT="17-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/java:0-${VARIANT}
ARG VARIANT="21-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/java:1.1.0-${VARIANT}

# [Option] Install Maven
ARG INSTALL_MAVEN="false"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Update the VARIANT arg to pick a Java version: 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "17-bullseye",
"VARIANT": "21-bullseye",
// Options
"INSTALL_MAVEN": "true",
"INSTALL_GRADLE": "true",
Expand Down
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ updates:
directory: "/.github/workflows/"
schedule:
interval: "daily"

- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
...
27 changes: 25 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
name: Build
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'adopt'
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- name: Upload coverage to codecov (tokenless)
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
- name: Upload coverage to codecov (with token)
if: >
github.repository == 'TheAlgorithms/Java' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Checkstyle
run: mvn checkstyle:check
- name: SpotBugs
run: mvn spotbugs:check
- name: PMD
run: mvn pmd:check
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.16.2
- uses: DoozyX/clang-format-lint-action@v0.17
with:
source: './src'
extensions: 'java'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'adopt'

- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gitpod/workspace-java-17:2023-08-30-14-07-38
FROM gitpod/workspace-java-21:2024-06-03-17-43-12

ENV LLVM_SCRIPT="tmp_llvm.sh"

Expand All @@ -11,7 +11,7 @@ USER root
RUN ./"$LLVM_SCRIPT" 16 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
clang-format-16=1:16.0.6~++20230710042027+7cbf1a259152-1~exp1~20230710162048.105 \
clang-format-16=1:16.0.6~++20231112100510+7cbf1a259152-1~exp1~20231112100554.106 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
12 changes: 9 additions & 3 deletions DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [MazeRecursion](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/MazeRecursion.java)
* [MColoring](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/MColoring.java)
* [NQueens](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/NQueens.java)
* [ParenthesesGenerator](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/ParenthesesGenerator.java)
* [Permutation](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/Permutation.java)
* [PowerSum](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/PowerSum.java)
* [WordSearch](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/backtracking/WordSearch.java)
Expand Down Expand Up @@ -388,7 +389,7 @@
* [PalindromeSinglyLinkedList](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java)
* [RangeInSortedArray](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/RangeInSortedArray.java)
* [Sort012D](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/Sort012D.java)
* [Sparcity](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/Sparcity.java)
* [Sparsity](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/Sparsity.java)
* [ThreeSumProblem](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/ThreeSumProblem.java)
* [TwoSumProblem](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/TwoSumProblem.java)
* [WordBoggle](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/misc/WordBoggle.java)
Expand Down Expand Up @@ -438,12 +439,11 @@
* [ReturnSubsequence](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/ReturnSubsequence.java)
* [ReverseStackUsingRecursion](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/ReverseStackUsingRecursion.java)
* [RootPrecision](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/RootPrecision.java)
* [RotateMatriceBy90Degree](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/RotateMatriceBy90Degree.java)
* [RotateMatrixBy90Degrees](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/RotateMatrixBy90Degrees.java)
* [SieveOfEratosthenes](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/SieveOfEratosthenes.java)
* [SkylineProblem](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/SkylineProblem.java)
* [StringMatchFiniteAutomata](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/StringMatchFiniteAutomata.java)
* [Sudoku](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/Sudoku.java)
* [TopKWords](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/TopKWords.java)
* [TowerOfHanoi](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/TowerOfHanoi.java)
* [TwoPointers](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/TwoPointers.java)
* [Verhoeff](https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/others/Verhoeff.java)
Expand Down Expand Up @@ -577,6 +577,7 @@
* [FloodFillTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/FloodFillTest.java)
* [MazeRecursionTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/MazeRecursionTest.java)
* [MColoringTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/MColoringTest.java)
* [ParenthesesGeneratorTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/ParenthesesGeneratorTest.java)
* [PermutationTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/PermutationTest.java)
* [PowerSumTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/PowerSumTest.java)
* [WordSearchTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/backtracking/WordSearchTest.java)
Expand Down Expand Up @@ -688,6 +689,7 @@
* [KnapsackMemoizationTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/KnapsackMemoizationTest.java)
* [KnapsackTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/KnapsackTest.java)
* [LevenshteinDistanceTests](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/LevenshteinDistanceTests.java)
* [LongestIncreasingSubsequenceTests](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequenceTests.java)
* [MinimumPathSumTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/MinimumPathSumTest.java)
* [MinimumSumPartitionTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/MinimumSumPartitionTest.java)
* [OptimalJobSchedulingTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/dynamicprogramming/OptimalJobSchedulingTest.java)
Expand Down Expand Up @@ -728,6 +730,7 @@
* [DigitalRootTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/DigitalRootTest.java)
* [DistanceFormulaTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/DistanceFormulaTest.java)
* [DudeneyNumberTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/DudeneyNumberTest.java)
* [FactorialRecursionTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/FactorialRecursionTest.java)
* [FactorialTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/FactorialTest.java)
* [FastInverseSqrtTests](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/FastInverseSqrtTests.java)
* [FFTTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/FFTTest.java)
Expand Down Expand Up @@ -760,7 +763,9 @@
* [MillerRabinPrimalityCheckTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/MillerRabinPrimalityCheckTest.java)
* [MinValueTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/MinValueTest.java)
* [MobiusFunctionTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/MobiusFunctionTest.java)
* [ModeTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/ModeTest.java)
* [NthUglyNumberTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/NthUglyNumberTest.java)
* [NumberOfDigitsTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java)
* [PalindromeNumberTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/PalindromeNumberTest.java)
* [ParseIntegerTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/ParseIntegerTest.java)
* [PascalTriangleTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/maths/PascalTriangleTest.java)
Expand Down Expand Up @@ -851,6 +856,7 @@
* [BogoSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/BogoSortTest.java)
* [BubbleSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/BubbleSortTest.java)
* [BucketSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/BucketSortTest.java)
* [CircleSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/CircleSortTest.java)
* [CocktailShakerSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/CocktailShakerSortTest.java)
* [CombSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/CombSortTest.java)
* [DualPivotQuickSortTest](https://github.com/TheAlgorithms/Java/blob/master/src/test/java/com/thealgorithms/sorts/DualPivotQuickSortTest.java)
Expand Down
136 changes: 136 additions & 0 deletions Java/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
Language: Java
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 300
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertNewlineAtEOF: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...
25 changes: 25 additions & 0 deletions Java/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/java/.devcontainer/base.Dockerfile

# [Choice] Java version (use -bullseye variants on local arm64/Apple Silicon): 11, 17, 11-bullseye, 17-bullseye, 11-buster, 17-buster
ARG VARIANT="21-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/java:1.1.0-${VARIANT}

# [Option] Install Maven
ARG INSTALL_MAVEN="false"
ARG MAVEN_VERSION=""
# [Option] Install Gradle
ARG INSTALL_GRADLE="false"
ARG GRADLE_VERSION=""
RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install maven \"${MAVEN_VERSION}\""; fi \
&& if [ "${INSTALL_GRADLE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/sdkman/bin/sdkman-init.sh && sdk install gradle \"${GRADLE_VERSION}\""; fi

# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
47 changes: 47 additions & 0 deletions Java/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/java
{
"name": "Java",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update the VARIANT arg to pick a Java version: 11, 17
// Append -bullseye or -buster to pin to an OS version.
// Use the -bullseye variants on local arm64/Apple Silicon.
"VARIANT": "21-bullseye",
// Options
"INSTALL_MAVEN": "true",
"INSTALL_GRADLE": "true",
"NODE_VERSION": "lts/*"
}
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"vscjava.vscode-java-pack",
"GitHub.copilot",
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "java -version",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"git": "os-provided",
"github-cli": "latest"
}
}
1 change: 1 addition & 0 deletions Java/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @yanglbme @vil02 @BamaCharanChhandogi
Loading