* Add Sum of Squares algorithm implementation
* Format code and add Wikipedia URL for Lagrange's theorem
* Fixed clang-format issues
* Added Mo's Algorithm and DiceThrower recursive algorithms
- Mo's Algorithm: Square root decomposition for offline range queries(Imp in CP)
- DiceThrower: Recursive backtracking for dice combinations(very imp)
- Both algorithms include comprehensive test suites
- Formatted with clang-format and i follow contribution guidelines
* Fixed checkstyle violation
* Fixed SpotBugs issue
* Added in PMD exclusions
* Improved test coverage for better Codecov scores.
* Fixed clang-format issues in test files
* Add Mo's Algorithm and DiceThrower algorithms with comprehensive tests
* Fixed PartitionProblem.java documentation comment placement
* feat(ciphers): Add PermutationCipher implementation with comprehensive tests
- Implement PermutationCipher class for transposition encryption/decryption
- Add encrypt() and decrypt() methods with permutation key support
- Include robust key validation (1-based positions, no duplicates)
- Implement automatic padding for incomplete blocks using 'X' character
- Add comprehensive error handling with descriptive exceptions
- Create 20+ JUnit test cases covering encryption, decryption, edge cases
- Support various key sizes and text processing (spaces removal, case handling)
- Include detailed JavaDoc documentation with algorithm explanation
Algorithm Details:
- Divides plaintext into blocks based on key length
- Rearranges characters within each block according to permutation positions
- Supports round-trip encryption/decryption with inverse permutation
- Handles edge cases: empty strings, single character keys, padding
Tests include: basic functionality, different key sizes, error validation,
real-world examples, and edge case handling.
* Run PermutationCipherTest using Maven
* refactor(PermutationCipher): clean up code by removing unnecessary whitespace and comments
* fix(tests): remove unnecessary whitespace in test assertion for encryption
* fix(tests): correct indentation in assertion for encryption verification
---------
Co-authored-by: a <alexanderklmn@gmail.com>
* feat: add comprehensive test coverage for ProcessDetails entity class (#6588)
- Add ProcessDetailsTest.java with 20 comprehensive test methods
- Cover all constructors, getters, and setters
- Include edge cases: null values, negatives, zeros, max values
- Add real-world scheduling scenario tests
- Ensure 100% line coverage for ProcessDetails class
- Follow project checkstyle rules and conventions
Fixes#6588
* fix: resolve SpotBugs UC_USELESS_OBJECT warning in ProcessDetailsTest
- Add assertions for process1 in testMultipleProcessesIndependence method
- Verify both processes are properly tested for independence
- Ensure all created objects are meaningfully used in tests
Fixes SpotBugs warning: UC_USELESS_OBJECT at line 224
---------
Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
* Add Sum of Squares algorithm implementation
* Format code and add Wikipedia URL for Lagrange's theorem
* Fixed clang-format issues
---------
Co-authored-by: Oleksandr Klymenko <alexanderklmn@gmail.com>
* Fix MiniMaxAlgorithm setScores bug and add comprehensive tests
- Fix bug in setScores method where scores.length % 1 == 0 always returned true
- Add isPowerOfTwo helper method to properly validate array length
- Add comprehensive unit tests covering edge cases and algorithm correctness
- Tests include validation for power of 2 check, minimax logic, and error handling
Fixes issue with incorrect validation logic in MiniMaxAlgorithm.setScores()
* Fix Checkstyle violations and improve setScores validation
- Replace star imports with explicit imports in test file
- Remove trailing whitespaces from all lines
- Add proper file ending newline
- Improve setScores method to handle edge cases properly
- Use direct bit manipulation for power-of-2 check as suggested
- Ensure error message is printed and scores remain unchanged for invalid input
All Checkstyle violations resolved and tests pass successfully.
* Add missing newline at end of MiniMaxAlgorithmTest.java
- Fix Checkstyle violation: NewlineAtEndOfFile
- Ensure file ends with proper newline character
- All tests continue to pass successfully
* Fix PMD violation by utilizing isPowerOfTwo method
- Replace inline bit manipulation with isPowerOfTwo method call
- Resolves PMD UnusedPrivateMethod violation
- Maintains same validation logic and error handling
- All tests continue to pass successfully
* test: improve MiniMaxAlgorithm test coverage for CodeCov
- Add comprehensive test cases for isPowerOfTwo function edge cases
- Test setScores method with various invalid array lengths (0, 3, 5, 6, 7, 9, 10, 15)
- Add tests for large valid powers of 2 (up to 64 elements)
- Ensure complete coverage of error handling branches
- Increase test count from 14 to 19 tests
- Fix partial coverage issues identified in CodeCov report
Resolves CodeCov coverage gaps in MiniMaxAlgorithm.java
* Fix checkstyle errors
* Fix checkstyle errors
---------
Co-authored-by: ssaha <ssaha@wiley.com>
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
* Migrate recursive reverse string method and tests to ReverseString
- Moved recursive reverse method from ReverseStringRecursive.java to ReverseString.java
- Moved tests from ReverseStringRecursiveTest.java to ReverseStringTest.java
- Deleted old ReverseStringRecursive files
* Fix formatting for ReverseStringTest.java as per clang-format linter
* fix: revert ReverseStack deletions and ensure lint compliance
* Fix formatting for ReverseStack and test files
* Delete ReverseStackUsingRecursion and its test as requested
---------
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
* Add DFS with parent-completion constraint for DAG traversal
* warning in PartitionProblem.java affecting tests
* added clang-format and updated javadoc
* optimized imports and rechecked camelCase format in tests
* removed .* import and made small visual change
* replaced a inline return with correct {} block
* Removed changed in PartitionProblem.java, Renamed class name to be straightforward about the implementation.Added full names instead of shortcuts, and included record.
* updated for clang format
---------
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
* Remove duplicate SimpleSort (same logic as ExchangeSort)
* Removed test class for SimpleSort as it was also duplicate
---------
Co-authored-by: Lucas G <lucasgomesm1808@gmail.com>
* 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>