Hardik Pawar
966b4e369d
feat: Add ClearLeftmostSetBit new algorithm with Junit tests ( #5702 )
2024-10-12 09:00:12 +03:00
Giulio Tantaro
2a167f4bc3
Add tests Sudoku ( #5722 )
...
* Add tests Sudoku
* Fix
* Update file
---------
Co-authored-by: Giulio Tantaro <giulio.tantaro@codeploy.it >
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com >
2024-10-11 22:21:13 +03:00
Saahil Mahato
1c978c52f1
feat: add karatsuba multiplication ( #5719 )
...
* feat: add karatsuba multiplication
* fix: fallback size
* fix: big integer instances
---------
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com >
2024-10-11 14:13:51 +00:00
Hardik Pawar
0ca4398188
feat: Add RandomSearch new algorithm with Junit tests ( #5701 )
2024-10-11 16:58:34 +03:00
Varnan Rathod
2338428578
Add cipher class, cipher tests, enhance docs in 'AtbashCipher.java' ( #5690 )
2024-10-11 06:05:26 +00:00
xuyang471
2040df88d9
Add Elliptic Curve Cryptography ( #5700 )
2024-10-11 05:47:36 +00:00
Rupa
7326ab2c12
Add Space Optimized Solution to Subset sum problem ( #5612 )
2024-10-10 20:46:43 +00:00
Saahil Mahato
79544c81eb
feat: add solovay strassen primality test ( #5692 )
...
* feat: add solovay strassen primality test
* chore: add wikipedia link
* fix: format and coverage
* fix: mvn stylecheck
* fix: PMD errors
* refactor: make random final
---------
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com >
2024-10-10 23:41:58 +03:00
Hardik Pawar
b1aeac5cd6
Add tests, remove main in UpperBound ( #5679 )
2024-10-10 20:36:06 +00:00
Hardik Pawar
4ec2701302
Add tests, remove main in TernarySearch ( #5677 )
2024-10-10 20:32:32 +00:00
Hardik Pawar
6802029251
Add tests, remove main in LinearSearchThread ( #5671 )
2024-10-10 23:29:20 +03:00
Hardik Pawar
29ad197a64
Add tests, remove main in SaddlebackSearch ( #5674 )
2024-10-10 23:24:52 +03:00
Hardik Pawar
e8b32513c8
Add tests, remove main in MonteCarloTreeSearch ( #5673 )
2024-10-10 23:20:39 +03:00
Hardik Pawar
b1724fa737
Add tests, remove main in LinearSearch ( #5670 )
2024-10-10 23:12:07 +03:00
Hardik Pawar
401d87365e
Add tests, remove main in UnionFind ( #5678 )
2024-10-10 23:07:02 +03:00
Hardik Pawar
fb11d455dd
Add tests in SearchInARowAndColWiseSortedMatrix ( #5675 )
2024-10-10 23:02:13 +03:00
Hardik Pawar
a663e66782
Add tests, remove main in SquareRootBinarySearch ( #5676 )
2024-10-10 22:57:40 +03:00
Hardik Pawar
38285771c8
Add tests, remove main in JumpSearch ( #5669 )
2024-10-10 22:51:06 +03:00
Hardik Pawar
f992fc425d
Add tests, remove main in IterativeTernarySearch ( #5668 )
2024-10-10 22:45:26 +03:00
Hardik Pawar
0a7065df38
Add tests, remove main in IterativeBinarySearch ( #5667 )
2024-10-10 22:41:07 +03:00
Hardik Pawar
ba3d3bf54e
Add tests, remove main, improve docs in InterpolationSearch ( #5666 )
2024-10-10 22:36:38 +03:00
Hardik Pawar
d197fc7df2
Add tests, remove main, improve docs in ExponentialSearch ( #5664 )
2024-10-10 22:30:37 +03:00
Hardik Pawar
a4e4319126
Add tests, remove main, improve docs in FibonacciSearch ( #5665 )
2024-10-10 22:26:16 +03:00
Hardik Pawar
ca5fbbf0a9
Add tests, remove main in BinarySearch ( #5663 )
2024-10-10 22:22:42 +03:00
Hardik Pawar
ac2c88ca9f
Add tests, add IllegalArgumentException, remove main in `WineProb… ( #5662 )
2024-10-10 21:19:37 +03:00
Hardik Pawar
c18dbc43b5
Add tests, add IllegalArgumentException in RodCutting ( #5661 )
2024-10-10 21:15:35 +03:00
Hardik Pawar
41f7e6aa9d
Add tests, improve docs in NewManShanksPrime ( #5660 )
2024-10-10 21:11:43 +03:00
Guhapriya Dharmaraj
44b0fc9408
Implement Maximum Sum of Non-Adjacent Elements ( #5544 )
2024-10-10 21:07:44 +03:00
Andrii Siriak
c152c38d1b
Update build.yml ( #5709 )
2024-10-10 21:03:56 +03:00
Hardik Pawar
e728aa7d6f
Add tests, remove main, enhance docs in MatrixChainMultiplication ( #5658 )
2024-10-10 20:16:04 +03:00
Hardik Pawar
bd3b754eda
Add EDFScheduling algorithm ( #5657 )
2024-10-10 19:56:44 +03:00
Prayas Kumar
90d20b3a43
Add smoothing constant to IDF formula in BM25 to prevent negative scores ( #5696 )
...
Co-authored-by: prayas7102 <prayas.prithvirajpratap7@example.com >
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com >
2024-10-10 10:39:22 +03:00
Tuhinm2002
d4fff30eaa
feat : new bit manipulation algo Single element in an array ( #5689 )
...
* feat : new algo uniquesubseqcount
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCount.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCountTest.java
* Update UniqueSubsequencesCount.java
* feat : new bitmanipulation algo
---------
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com >
2024-10-10 10:32:02 +03:00
Lakshyajeet Singh Goyal
6535d4755d
Add SwapAdjacentBits algorithm ( #5634 )
2024-10-09 23:02:41 +03:00
Hardik Pawar
c0f35242a1
Add tests, remove print & main methods in BoundaryFill.java ( #5640 )
2024-10-09 22:56:51 +03:00
xuyang471
48c65e4c5e
Add boundary traversal of binary tree ( #5639 )
2024-10-09 19:50:30 +00:00
Abhinay Verma
f170078b8b
Add Ones & Twos Complement in BitManipulation ( #5604 )
2024-10-09 22:45:15 +03:00
SAIVARDHAN15
6e6028e3d0
Fix columnarTranspositionCipher and typos in Test ( #5649 )
2024-10-09 22:41:25 +03:00
Hardik Pawar
029dd85646
Add tests, enhance docs in KadaneAlgorithm.java ( #5646 )
2024-10-09 22:36:00 +03:00
Hardik Pawar
ce9f42081d
Add tests, remove main, add negativity test in Fibonacci.java ( #5645 )
2024-10-09 22:20:45 +03:00
Hardik Pawar
4a0e46dae6
Add tests, remove main in DiceThrow/DP.java ( #5644 )
2024-10-09 22:16:20 +03:00
Hardik Pawar
6ddb26f48d
Add tests, remove main & print methods in CoinChange.java ( #5642 )
2024-10-09 22:04:04 +03:00
Sanketh L Reddy
2d34bc150f
Optimised Space Complexity To O(sum) ( #5651 )
...
* Optimised Space Complexity To O(sum)
* Fixes Clang Format
* Optimised Space Complexity To Use a Single DP Array
2024-10-09 16:57:11 +03:00
Hardik Pawar
0603accfd4
Add tests, remove main method, improve docs in BruteForceKnapsack ( #5641 )
2024-10-09 11:09:36 +03:00
Hardik Pawar
49a87d3b58
Add tests for CountFriendsPairing ( #5643 )
2024-10-09 10:08:16 +03:00
Hardik Pawar
4bcab89f05
Add JobSchedulingWithDeadline algorithm ( #5608 )
2024-10-09 06:33:39 +00:00
Hardik Pawar
5c79e5de5d
Add MedianOfTwoSortedArrays algorithm ( #5554 )
2024-10-09 08:56:08 +03:00
Albin Sabu
403649d404
Update CreateAndDetectLoop with tests ( #5561 )
2024-10-09 05:47:47 +00:00
Lakshyajeet Singh Goyal
b54cc21ade
Add NumberAppearingOddTimes algorithm ( #5633 )
2024-10-08 21:42:24 +03:00
Manish Raj
f3b2a94e74
Improve power sum algorithm ( #5652 )
...
* Update directory
* Improve PowerSum algorithm implementation and documentation
This commit enhances the PowerSum class in the backtracking package. The changes focus on improving code quality, readability, and documentation. Key improvements include:
1. Enhanced code structure and efficiency:
- Removed class-level variables for better thread safety
- Optimized the recursive approach to avoid unnecessary calculations
- Simplified the overall logic for easier understanding
2. Improved readability:
- Used more descriptive variable names (e.g., 'targetSum' instead of 'n', 'power' instead of 'x')
- Enhanced method structure with a private recursive helper method
3. Better documentation:
- Added comprehensive JavaDoc comments explaining the algorithm's purpose and implementation
- Clarified the meaning of parameters, especially relating them to the original problem statement (N and X)
- Improved inline comments for better code understanding
4. Adhered to Java best practices:
- Improved encapsulation by making the recursive method private
- Used Math.pow() directly instead of a custom power method
5. Maintained core functionality:
- The algorithm still solves the same problem as before, but with improved code quality
* updated PowerSum
* Refactor PowerSum algorithm implementation and documentation
* Refactor PowerSum algorithm implementation and documentation
* Refactor code formatting and remove unnecessary line in PowerSum.java
* Refactor code formatting and add newline at end of file in .clang-format
---------
Co-authored-by: manishraj27 <manishraj27@users.noreply.github.com >
Co-authored-by: Bama Charan Chhandogi <b.c.chhandogi@gmail.com >
2024-10-08 23:59:29 +05:30