67 Commits

Author SHA1 Message Date
7779c18ef6 Add More Tests (#4148) 2023-04-08 19:56:07 +03:00
d160156003 Update AbsoluteMax (#4140) 2023-04-03 22:39:17 +08:00
dd949e9b5d Increase test coverage (fixes #3895 #3896) (#3897) 2023-03-05 21:03:08 +02:00
87f9ebcb29 Add Frizzy Number (fixes #3379) (#3906) 2023-03-01 17:16:32 +02:00
b294ddcb38 Add AliquotSum (#3765) 2022-11-11 21:57:18 +02:00
b75dce17c3 algorithm: Square free integer (#3760)
* feat: Add square free integer implementation

Closes #3402

* test: Add unit tests for square free integer

Closes #3402

* fix: Fix failing build

Changed static import for assertEquals()
Closes #3402
2022-11-07 14:31:44 +05:30
c8ecd23183 Constructors BigInteger and BigDecimal used to wrap primitives should never be used. (#3627)
Constructors BigInteger and BigDecimal used to wrap primitives should never be used.

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-11-06 17:40:14 +05:30
1c7da7af25 Add LongDivision (#3691) 2022-11-06 12:18:14 +02:00
37a1659e18 Add HarshadNumberTest (#3722) 2022-11-03 12:59:13 +00:00
37db41fd6b Add AutomorphicNumber (#3735) 2022-11-03 12:55:48 +00:00
d418bbd1cf Created PerfectNumberTest.java & Added function in PerfectNumber.java (#3751)
* Added function in PerfectNumber.java

Added isPerfectNumber2() in PerfectNumber.java

* Created PerfectNumberTest.java

* fixed isPerfectNumber()

fixed bug in isPerfectNumber() for negative numbers

* fixed typo

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-11-01 06:22:56 +00:00
8efc71e609 Added functions in Perimeter.java (#3739)
* Added functions and removed main

* deleted perimeterTest.java

deleted perimeterTest.java to create PerimeterTest.java

* Recreated PerimeterTest.java

Renamed perimeterTest.java to PerimeterTest.java and added test cases

* deleted PerimeterTest.java

* Recreated PerimeterTest.java

Recreated PerimeterTest.java from perimeterTest.java
2022-10-30 09:22:25 +05:30
957f633c93 Added function and fixed bug in PerfectCube.java (#3655)
* Added another function to PerfectCube.java

Added another function to PerfectCube.java and fixed a testing mistake in line number 9

* Created PerfectCubeTest.java

Created PerfectCubeTest.java

* fixed PerfectCubeTest.java

* Fixed bug in PerfectCube.java

Fixed bug in PerfectCube.java in isPerfectCube() function for negative numbers. Now It gives the correct output for perfect negative numbers.

* removed main() in PerfectCube.java
2022-10-29 11:57:17 +05:30
5ab1b6c319 Created VolumeTest.java & Fixed Bugs in Volume.java (#3682)
* Fixed functions and removed main() in Volume.java

Fixed calculation errors in volumeSphere() and volumeHemisphere() functions and removed main() and changed functions access specifier from private to public

* Created VolumeTest.java

Created VolumeTest.java JUnit Tests for Volume.java

Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
2022-10-28 00:35:59 +05:30
6235fd6505 Add tests for Average (#3652) 2022-10-25 15:00:53 +03:00
8803b7f5e7 Add tests for Area (#3358) 2022-10-18 21:03:58 +03:00
efac505a6d Add twin prime (#3312) 2022-10-14 09:36:26 +00:00
911b98472c Add Tests for Dudeney Number (#3336) 2022-10-10 17:25:06 +00:00
8661d07276 Add sum without using any mathematical operators (#3473) 2022-10-10 20:19:01 +03:00
e96f567bfc Format code with prettier (#3375) 2022-10-03 17:23:00 +08:00
8ca571d887 Add Collatz Conjecture (#3290) 2022-09-26 04:51:21 +00:00
ea8e0463ef Add Liouville lambda function (#3284) 2022-09-24 13:18:12 +00:00
07a5531f1a Add prime factorization algorithm (#3278) 2022-09-21 19:29:20 +00:00
a41656a311 Add pollard rho algorithm (#3260) 2022-09-16 07:27:40 +00:00
1e4c4a112d Add Perimeter Calculation Algorithms (#3247)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-09-08 10:05:06 +03:00
69d0070c99 Add mobius function (#3241) 2022-09-03 06:34:06 +00:00
c500e8ae5a Add Newton Raphson method (#3224) 2022-08-27 09:40:06 +03:00
2ffcff12fc Fix fast inverse sqrt (fixes #3199) (#3228)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-08-24 13:37:07 +03:00
3f69603440 Add least common multiple algorithm (#3216) 2022-08-17 08:59:07 +03:00
854b900257 Add Josephus Problem Recursive Solution (#3208) 2022-08-13 10:50:39 +00:00
3918d9eaee Add three new distance formulas (#3203)
-Manhattan Distance
-Hamming Distance
-Minkowski Distance
2022-08-02 21:39:52 +03:00
898c2f6414 Add tests for Selection Sort (#3091) 2022-07-19 20:40:59 +03:00
b2f6827c36 Add Tests for DigitalRoot Algorithm (#3186) 2022-07-12 06:29:49 +00:00
f7bd7682ba Update Combinations.java and add test case (#3184) 2022-07-08 19:31:09 +08:00
826b612d0d Add testcase to Ceil Algorithm (#3183)
Co-authored-by: Yang Libin <contact@yanglibin.info>
2022-07-07 14:24:24 +08:00
3fb9a606a3 Add test case to Binomial Coefficient Algorithm (#3179)
Co-authored-by: Yang Libin <contact@yanglibin.info>
2022-07-05 17:37:11 +08:00
f273b30998 Add test case to BinaryPow Algorithm (#3177)
Co-authored-by: Yang Libin <contact@yanglibin.info>
2022-07-04 20:53:56 +08:00
2a23770873 Add tests for Amicable Numbers (#3168) 2022-06-28 18:36:06 +00:00
c750283a1c Add testcase to Automorphic Number Algorithm (#3166) 2022-06-27 08:34:42 +03:00
678ec396fc Add tests for isPerfectSquare (#3131) 2022-06-15 19:19:27 +03:00
ba3c0319ed Add tests for sum of digits (#3083) 2022-06-09 09:50:16 +03:00
8982692ca6 Add tests for factorial (#3107) 2022-06-09 09:47:31 +03:00
45f3e5b6de Add a test for average (#3084)
Co-authored-by: thanhtri122002 <thanhnt122002@122002>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-06-08 18:19:42 +03:00
de
77e481336e Add test for Armstrong (#3104)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-06-08 18:15:01 +03:00
9b4ac70403 Add more tests for findMin (#3102)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-06-07 08:21:46 +03:00
8e8d11a63c Add Tests for FindMin (#3079) 2022-06-04 19:49:37 +03:00
2fb87c37fc Add tests for PythagoreanTriple (#3070) 2022-06-02 17:21:40 +03:00
e5057defa7 Add tests for findMax (#3067) 2022-05-30 14:11:30 +03:00
bb5b50dea2 Add Z-Score Algorithm (#3065)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2022-05-29 11:16:04 +03:00
f35eef285a Add tests for GCD and PrimeCheck (#3062) 2022-05-25 13:46:20 +03:00