* Adding DampedOscillator code
* Adding one more test case
* Adding one more test case
* Adding one more test case
* Fixing build issues.
* Fixing build issues.
* feat(graph): add Push–Relabel max flow with tests and index
* style(checkstyle): reduce discharge parameter count via State holder
* chore(pmd): make discharge void and remove empty else; satisfy PMD
---------
Co-authored-by: a <alexanderklmn@gmail.com>
* Create TortoiseHareAlgorithm.java
Implement TortoiseHareAlgo with append, getMiddle, and toString methods
- Added generic singly linked list with inner Node class
- Implemented append() to add elements
- Implemented getMiddle() using Tortoise-Hare approach
- Added toString() for readable list representation
* Create TortoiseHareAlgoTest.java
Add JUnit tests for TortoiseHareAlgo
- Verified append() and toString() output
- Tested getMiddle() for odd, even, and empty lists
- Ensured correct behavior and null handling
* Update README.md
Add TortoiseHareAlgo to linked list documentation
- Added TortoiseHareAlgo.java to file descriptions
- Described its purpose: finding middle element using Tortoise-Hare algorithm
* Rename TortoiseHareAlgorithm.java to TortoiseHareAlgo.java
Fixed build error
* Update TortoiseHareAlgoTest.java
Fixed line formatting build error
* Update TortoiseHareAlgoTest.java
Fixed line formatting build error
* Update TortoiseHareAlgo.java
Added {} after if statement instead of directly writing statement
* Update TortoiseHareAlgo.java
Fixed line formatting build error
* Update TortoiseHareAlgo.java
Added {} after if statement instead of directly writing statement
* Update TortoiseHareAlgoTest.java
Replace .* import with specific imports
---------
Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>
* Add Yen’s K-shortest loopless paths with tests and index update
* style: fix Checkstyle in Yens algorithm and tests
* fix: resolve SpotBugs in Yens algorithm
* fix (PMD): rename short variables in the code
* (pmd): code fixes
* fix(bloomfilter): hash arrays by content to satisfy array membership tests
* style(pmd): fix EmptyControlStatement in validate() by returning early when src==dst
* style(pmd): remove unnecessary return in validate()
* Add Dinics max flow algorithm with tests and index update
* Docs: add Dinic reference link and apply clang-format
* Fix: Checkstyle violations in Dinic and tests
* style: apply clang-format to Dinic and tests
---------
Co-authored-by: a <alexanderklmn@gmail.com>
* feat: added TwoSat solutions and Tests and also updated Directory.md
* added reference urls to the article related to the 2-SAT
* Fix generic type warnings in TwoSat.java
* maven build fix: added rawtypes in SuppressWarnings
* fixed checkstyle error
* fix: Sorted import order
---------
Co-authored-by: a <alexanderklmn@gmail.com>
* feat: add Germain and Safe prime utility class with unit tests
* refactor the code
* fixed identified bugs
* fixed identified remaining bugs
---------
Co-authored-by: Deniz Altunkapan <93663085+DenizAltunkapan@users.noreply.github.com>
* feat: FloodFill Algorithm with iterative approach
- nested class Point: helper class, represents point in 2D field (x,y)
- shouldSkipPixel method: helper method to validate point
- floodFill method: iterative version of floodFill, uses Queue to add and poll Points and change it color if allowed
* feat: tests for IterativeFloodFill
-same tests as for normal floodFill and test for a big image
* docs: add link to floodFill algorithm
* codeStyle fix
* tests: add tests for edge cases
* codeStyle fix
* codeStyle fix
* codeStyle fix
* refactor: reorganize structure and add JavaDoc
- Move private methods after public methods for better readability
- Add class-level JavaDoc documentation with algorithm description and links to references
* feat: add sieve of atkin algorithm
* fix: add full test coverage
* refactor: if condition braces
---------
Co-authored-by: a <alexanderklmn@gmail.com>
* 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>