Godwill Christopher
c42b1c940c
style: enable ParameterName in CheckStyle. ( #5196 )
...
* Enabled: ParameterName in CheckStyle.
* Refactored to fix bug caused by selfAssignment of variables in VectorCrossproduct class
2024-05-31 22:01:11 +02:00
S. Utkarsh
25d711c5d8
style: enable LocalVariableName in CheckStyle ( #5191 )
...
* style: enable LocalVariableName in checkstyle
* Removed minor bug
* Resolved Method Name Bug
* Changed names according to suggestions
2024-05-28 20:29:28 +02:00
Piotr Idzik
92887a10c2
style: include NAB_NEEDLESS_BOXING_PARSE ( #5184 )
2024-05-28 06:47:51 +00:00
Godwill Christopher
295e7436b1
style: enable MethodName in CheckStyle ( #5182 )
...
enabled: MethodName in CheckStyle
2024-05-27 09:06:06 +02:00
Piotr Idzik
ea4dc15a24
style: do not suppress try ( #5167 )
2024-05-27 03:02:36 +05:30
vaibhav9t1
9eaa2bb756
style: enable MultipleVariableDeclarations in checkstyle ( #5175 )
...
Co-authored-by: vaibhav <vaibhav.waghmare@techprescient.com >
2024-05-25 20:18:27 +02:00
Godwill Christopher
160742104d
Enabled LocalFinalVariableName in Checkstyle ( #5172 )
2024-05-24 16:38:37 +05:30
Godwill Christopher
0f42e995a4
style: enabled InnerAssignment in checkstyle ( #5162 )
...
* style: enabled InnerAssignment in checkstyle
* Refactor code formatting in KnapsackMemoization.java and UnionFind.java
* style: remove redundant blank line
* style: mark `includeCurrentItem` and `excludeCurrentItem` as `final`
* style: remove `KnapsackMemoization` from `pmd-exclude.properties`
* style: use `final`
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2024-05-16 16:46:03 +00:00
Piotr Idzik
319d5143cc
refactor: cleanup DudeneyNumber ( #5156 )
2024-05-12 14:35:33 +05:30
Piotr Idzik
d3bb691f59
style: enable HideUtilityClassConstructor in checkstyle ( #5147 )
2024-05-08 09:58:29 +03:00
Piotr Idzik
414835db11
style: enable AvoidStarImport in checkstyle ( #5141 )
2024-05-05 20:48:56 +02:00
Piotr Idzik
b3903f5768
style: enable RedundantModifier in checkstyle ( #5140 )
2024-05-03 22:10:49 +03:00
marysiuniq
1e2d7e9431
style: enable ConstantName in checkstyle ( #5139 )
...
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu >
2024-05-02 18:31:37 +02:00
Piotr Idzik
6de154d218
tests: add tests of Mode ( #5104 )
2024-04-26 06:40:01 +00:00
marysiuniq
8129686e2e
Added tests for FactorialRecursion ( #5109 )
...
* Added tests for `FactorialRecursion`
* Apply suggestions from code review
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
---------
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu >
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2024-04-20 20:31:13 +02:00
marysiuniq
7201dc78ad
Added tests for NumberOfDigits ( #5107 )
...
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu >
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2024-04-13 20:45:07 +02:00
SOZEL
ab371843ac
Close Scanner to avoid resource leak ( #5077 )
2024-03-12 19:49:58 +01:00
Piotr Idzik
8930ab5b16
Cleanup SumOfDigits and its tests ( #4994 )
2024-01-05 23:05:52 +02:00
Piotr Idzik
1ea95ffa92
Cleanup PerfectSquare and its tests ( #4992 )
2024-01-04 12:56:48 +02:00
AthinaSw
6a0c0585e4
Add cross-correlation and auto-correlation ( #4984 )
2024-01-03 20:11:07 +02:00
Piotr Idzik
9bebcee5c7
Make sumOfDigits long in HarshadNumber.isHarshad ( #4973 )
...
fix: make `sumOfDigits` `long` in `HarshadNumber.isHarshad`
2023-11-30 22:06:31 +05:30
Piotr Idzik
fc21a8bffe
Explicitly cast result of Math.pow to long in Armstrong ( #4972 )
2023-11-30 10:50:09 +02:00
Anup Omkar
9dde8a7808
Add MatrixRank ( #4571 )
...
* feat: adding matrix rank algorithm
* fix: formatting
* fix: adding comments, refactor and handling edge cases
* refactor: minor refactor
* enhancement: check matrix validity
* refactor: minor refactor and fixes
* Update src/main/java/com/thealgorithms/maths/MatrixRank.java
* feat: add unit test to check if input matrix is not modified while calculating the rank
---------
Co-authored-by: Anup Omkar <anup_omkar@intuit.com >
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
Co-authored-by: Andrii Siriak <siryaka@gmail.com >
2023-10-25 15:34:05 +02:00
Appari Satya Barghav
9dae389faa
Herons : Changed the signature of the function ( #4686 )
...
* Made changes to the code to correct the Logic of Armstrong Number
* Resolved the issues
* Trying to resolve the Linter error by changing Variable name
* Changed Variable Names : trying to resolve Clang error
* Chnged the signature of the function
* Added the Function documentation
* Added exception for parameters
* Resolved with suggested changes
* Resolved with Suggested changes
* fix: use proper logic
---------
Co-authored-by: vil02 <vil02@o2.pl >
2023-10-23 23:09:42 +02:00
Pronay Debnath
24a8223062
Added [FEATURE REQUEST] Golden Ration formula to find Nth Fibonacci number #4505 ( #4513 )
...
* Create FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Create FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Delete src/main/java/com/thealgorithms/maths/FibonacciNumberTest.java
* Create FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Create FibonacciCalculator.java
* Update FibonacciNumberTest.java
* Update and rename FibonacciCalculator.java to FibCalc.java
* Update FibonacciNumberTest.java
* Update FibCalc.java
* Update FibonacciNumber.java
* Delete src/test/java/com/thealgorithms/maths/FibCalc.java
* Create FibCalc.java
* Update FibonacciNumberTest.java
* Update FibCalc.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumber.java
* fix: use proper name
* fix: use proper class name
* tests: add `returnsCorrectValues`
* Update and rename FibCalc.java to Fibonacci.java
* Update Fibonacci.java
* Update FibonacciNumber.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update Fibonacci.java
* Update FibonacciNumber.java
* Update and rename FibCalcTest.java to FibonacciTest.java
* Update FibonacciNumber.java
* Update Fibonacci.java
* Update Fibonacci.java
* Update Fibonacci.java
* Update FibonacciTest.java
* Update Fibonacci.java
* Update src/main/java/com/thealgorithms/maths/Fibonacci.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FibonacciTest.java
* Update FibonacciNumberTest.java
* Update FibonacciNumberTest.java
* Update FibonacciTest.java
* Update src/main/java/com/thealgorithms/maths/Fibonacci.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/Fibonacci.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FibonacciNumber.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FibonacciNumberTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FibonacciNumber.java
* Update FibonacciNumber.java
* Update Fibonacci.java
* Update FibonacciNumber.java
* Update and rename FibonacciNumber.java to FibonacciNumberGoldenRation.java
* Update and rename FibonacciNumberTest.java to FibonacciNumberGoldenRationTest.java
* Update Fibonacci.java
* Update FibonacciNumberGoldenRation.java
* Update FibonacciNumberGoldenRationTest.java
* Update FibonacciTest.java
* Update Fibonacci.java
* Update FibonacciNumberGoldenRationTest.java
* Update FibonacciNumberGoldenRationTest.java
* Update FibonacciNumberGoldenRation.java
* Update FibonacciNumberGoldenRation.java
* Update FibonacciNumberGoldenRationTest.java
* Update FibonacciNumberGoldenRationTest.java
* Update src/main/java/com/thealgorithms/maths/FibonacciNumberGoldenRation.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update and rename Fibonacci.java to FibonacciLoop.java
* Update FibonacciNumberGoldenRation.java
* Update FibonacciNumberGoldenRationTest.java
* Update and rename FibonacciTest.java to FibonacciLoopTest.java
* Update FibonacciLoop.java
* Update FibonacciLoop.java
* Update FibonacciNumberGoldenRation.java
* docs: add missing dot
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
Co-authored-by: vil02 <vil02@o2.pl >
2023-10-13 21:23:30 +02:00
Ricardo Ramos
e9bbf35ff9
Add FloorTest and clean-up Floor ( #4769 )
...
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com >
Co-authored-by: Ricardo Ramos <0102016812@grupotel.corp >
2023-10-12 00:21:53 +03:00
Abhinav Pandey
152e29034d
Improved code readability and code quality ( #4663 )
...
* Fixed Small typos :-)
* Update BufferedReader.java
* Made the following changes :
* Improved readability of files and removed gramatical errors.
* Implemented data assigning instead of manually calling arr.ylength in several instances like FindMax, FindMaxRecursion etc.
* Removed unwanted params from several files
* Implemented Math methods in files math/FindMinRecursion.java and FindMaxRecursion.java
* Update src/main/java/com/thealgorithms/maths/FindMinRecursion.java
---------
Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com >
2023-10-11 17:29:55 +05:30
Lukas
17fe4298b6
Add MaxValueTest and remove main from MaxValue ( #4756 )
...
* Create MaxValueTest.java
* Update MaxValue.java
2023-10-10 21:27:23 +02:00
Lukas
c6a22de12f
Add MinValueTest and remove main from MinValue ( #4713 )
...
* Update MinValue.java
* Create MinValueTest.java
* Revert "Create MinValueTest.java"
* Create MinValueTest.java
* Update MinValueTest.java
* Update MinValueTest.java
* Update MinValue.java
* Update src/test/java/com/thealgorithms/maths/MinValueTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/MinValueTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/MinValue.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2023-10-09 17:17:02 +02:00
Lukas
064ca8f591
cleanup FindMinRecursion ( #4568 )
...
* Create FindMinRecusionTest.java
* Update FindMinRecursion.java
* Update FindMinRecursion.java
* Update FindMinRecursion.java
* Rename FindMinRecusionTest.java to FindMinRecursionTest.java
* Update FindMinRecursionTest.java
* style: remove unused imports
---------
Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com >
2023-10-05 22:01:27 +02:00
Appari Satya Barghav
a3a2d845d5
Made changes to the code to correct the Logic of Armstrong Number ( #4619 )
...
* Made changes to the code to correct the Logic of Armstrong Number
* Resolved the issues
* Trying to resolve the Linter error by changing Variable name
* Changed Variable Names : trying to resolve Clang error
2023-10-04 20:02:49 +05:30
Lukas
8dc5505323
Add FindMaxRecursionTest ( #4431 )
...
* Update FindMaxRecursion.java
* Create FindMaxRecusionTest.java
* Update and rename FindMaxRecusionTest.java to FindMaxRecursionTest.java
* Update FindMaxRecursion.java
* Update FindMaxRecursion.java
* Update src/test/java/com/thealgorithms/maths/FindMaxRecursionTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/test/java/com/thealgorithms/maths/FindMaxRecursionTest.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update src/main/java/com/thealgorithms/maths/FindMaxRecursion.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FindMaxRecursion.java
* Update FindMaxRecursionTest.java
* Update FindMaxRecursionTest.java
* Update FindMaxRecursion.java
* Update src/main/java/com/thealgorithms/maths/FindMaxRecursion.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
* Update FindMaxRecursion.java
* Update FindMaxRecursion.java
* Update FindMaxRecursion.java
* Update FindMaxRecursion.java
* Update FindMaxRecursion.java
* Update src/main/java/com/thealgorithms/maths/FindMaxRecursion.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2023-10-01 18:21:29 +00:00
Bharath Sanjeevi T
37b3844b98
Add SecondMinMax ( #4432 )
...
* Added Second Min/Max program
* Clang-format-lint error resolved
* Clang-format-error 2
* Added Program to find Second Minimum/Maximum element
* Test File & few changes
* Clang-lint-error resolved
* Maven Build Error Resolved
* Clang-lint-error resolved
* Clang-lint-error resolved 2
* Changes Resolved
* Test Arguements are Streamed
* Clang-lint-error resolved
* incresed code reusability
* Added Program to find Second Min / Max
* Program to find Second Min / Max
* Program to find Second Minimum / Maximum
* Program to find Second Best Number
* style: mark `initialVal` as `final`
* style: resolve `MultipleVariableDeclarations`
Each variable declaration must be in its own statement.
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com >
2023-10-01 15:28:37 +00:00
Lukas
bf777fff8f
Remove array len + Math.min ( #4405 )
2023-09-26 18:31:16 +03:00
Lukas
cada67b1eb
Remove array len + Math.max ( #4401 )
2023-09-25 19:10:04 +00:00
Piotr Idzik
d6024f9cd4
Make FindMin a proper utilty class ( #4397 )
2023-09-24 10:25:28 +00:00
Piotr Idzik
fa77b50ef9
style: make FindMax a proper utilty class ( #4398 )
2023-09-24 13:55:19 +05:30
Lukas
ad4be217d4
Update FindMax.java ( #4396 )
2023-09-24 09:11:36 +02:00
Lukas
c1476d796c
Make FindMin more efficient ( #4389 )
2023-09-24 06:26:05 +00:00
Piotr Idzik
58c21c5756
refactor: simplify ParseInteger ( #4376 )
2023-09-16 21:57:03 +03:00
Abhinav Pandey
81f38174a6
Fix small typos ( #4357 )
2023-09-08 16:10:22 +03:00
Punit Patel
a96ad84fac
Add different types of Mean ( #4339 )
2023-09-02 17:22:28 +00:00
Piotr Idzik
f010a47608
chore: enforce InsertNewlineAtEOF in clang-format ( #4343 )
...
* style: insert newline at eof
* style: use `InsertNewlineAtEOF` in `clang-format`
* fix: use `clang-format-16`
* chore: update clang-format-lint-action to v0.16.2
---------
Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com >
2023-09-01 04:10:46 +00:00
Bama Charan Chhandogi
80a4435038
Add tests for power using recursion algorithm ( #4335 )
2023-08-28 07:03:27 +00:00
tomkrata
ebd356e182
Add Miller-Rabin Primality Test ( #4329 )
2023-08-27 20:07:27 +00:00
Himesh Kohad
07945c7704
Add StrobogrammaticNumber ( #4278 )
2023-08-11 12:22:14 +00:00
Piotr Idzik
c4a9ef1566
Add PowerOfTwoOrNotTest ( #4279 )
2023-08-04 12:31:47 +00:00
Piotr Idzik
ee23b6c2e5
Add tests for GenericRoot ( #4276 )
2023-08-03 23:14:59 +03:00
Piotr Idzik
087d523ed0
Make Factorial a proper utility class ( #4267 )
2023-07-29 08:15:03 +03:00
Albina Gimaletdinova
f83008d80a
Refactor factorial, add unit tests ( #4266 )
2023-07-28 22:02:04 +03:00