626 Commits

Author SHA1 Message Date
ce34595628 Improve TrieImp.java comments & enhance readability (#5526) 2024-10-05 12:47:52 +03:00
042d458d34 fix: change location of others to correct places (#5559) 2024-10-04 17:47:50 +00:00
393337fa8e Add Tests for HillCipher (#5562) 2024-10-04 17:18:51 +00:00
389d1d70d5 feat: add conversion logic from integer to english (#5540)
* feat: add conversion logic from integer to english

* feat: update DIRECTORY.md

* feat: fix linting issues

* feat: fix build issue

* feat: address review comments

---------

Co-authored-by: sailok.chinta <sailok.chinta@kotak.com>
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com>
2024-10-04 20:13:40 +03:00
ea6457bf41 Add PrefixToInfix.java new algorithm (#5552)
* Add `PrefixToInfix.java` new algorithm

* Update directory

* Fix clang error

* Update directory

* Fix comment

* Add suggested changes

---------

Co-authored-by: Hardvan <Hardvan@users.noreply.github.com>
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com>
2024-10-04 19:58:52 +03:00
b61c54797b Add Infix To Prefix new algorithm with unit tests (#5537)
* Add `Infix To Prefix` new algorithm

* Update directory

* Update directory

* Fix clang

* Fix clang

* Add more tests

* Fix comma error

* Fix test cases

* Fix comment

* Remove unused import

* Update directory

* Add tests for null & empty strings

* Implement suggested changes

* Update directory

* Fix comment

---------

Co-authored-by: Hardvan <Hardvan@users.noreply.github.com>
Co-authored-by: Alex Klymenko <alexanderklmn@gmail.com>
2024-10-04 19:40:44 +03:00
5cbdb475ee Add digit separation for large integers (#5543) 2024-10-04 16:28:36 +00:00
41f767ef94 Add XOR Cipher (#5490) 2024-10-04 16:10:18 +00:00
66ee59cbaf Add function documentation in Sudoku.java (#5532)
* Add function documentation and parameterized tests to Sudoku.java

* Update directory

* Update directory

* Fix clang format errors

* Change

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Remove extra line

* Change values

* Fix

* Remove test

* Update directory

* Small comment fix

* Add comment

* Generalize comment

* Fix comment

* Update directory

* Fix comment

* Add changes suggested

---------

Co-authored-by: Hardvan <Hardvan@users.noreply.github.com>
2024-10-04 18:28:03 +03:00
be8df2188c Adds Longest Arithmetic Subsequence Implementation (#5501)
* Added LongestArthmeticSubsequence

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-10-03 15:04:49 +02:00
48a298028d feat: Remove duplicate implementation of Dutch National Flag Sort Algorithm (#5541)
* feat: Remove duplicate implementation of Dutch National Flag Sort Algorithm

* feat: update DIRECTORY.md

---------

Co-authored-by: sailok.chinta <sailok.chinta@kotak.com>
2024-10-03 13:51:34 +03:00
7b934af257 Improve comments, add function documentation in BinarySearch2dArray.java (#5518) 2024-10-03 07:10:59 +00:00
ce6d98f8da Add Merge Intervals algorithm (#5516) 2024-10-03 10:07:44 +03:00
ea0ed23961 feat: removing duplicate implementation of Dutch National Flag Sort Algorithm (#5539)
feat: removing duplicate implementation of Dutch National Flag Sort Implementation

Co-authored-by: sailok.chinta <sailok.chinta@kotak.com>
2024-10-03 09:42:38 +03:00
d436910ac4 Sorted Linked List Added (#5519)
* Sorted Linked List added with Javadoc and tests

* "Added comments to SortedLinkedList.java to describe the implementation and provide a reference link."

* Upgraded test from junit 4 to junit 5

* Added space before braces of functions

* Rename SortedlinkedListTest.java to SortedLinkedListTest.java

* made to string null safe

* Updated tail

* "Added assignment of `this.tail` to `newNode` in `SortedLinkedList` class."

* Remove assertions for minValue and maxValue in empty list test

* tried to get link updated

* "Fixed whitespace and formatting issues in SortedLinkedList.java and SortedLinkedListTest.java"

* formatting of test file corrected

* Removed few whitespaces

* Addressed comments by alxkm

* "Updated toString method to include brackets and removed default Node constructor."

* tests updated
2024-10-03 08:58:22 +03:00
013d122e7d feat: add recursion subsets (#5503) 2024-10-02 18:51:23 +00:00
e493eb2958 Add Edmonds Blossom Algorithm (#5471) 2024-10-02 18:04:01 +00:00
842ff5294f Improve comments & readability in ClimbingStairs.java (#5498) 2024-10-02 13:55:57 +00:00
e6f597acaf Add Gale-Shapley Algorithm and Tests (#5494) 2024-10-02 13:50:30 +00:00
dab8ff3d1d Improve comments in Mcoloring.java (#5484) 2024-10-02 16:46:34 +03:00
0bd86b3d7e Improve comments in ActivitySelection.java (#5485) 2024-10-02 13:34:52 +03:00
7c56a734e9 Add Volume "Algorithm Frustum Of Cone" Then Test It. (#5479)
* Add Function volumeFrustum To Calculate Frustum Of Cone Then Test It.

* Add Function volumeFrustumOfCone To Calculate Frustum Of Cone Then Test It.

* Update VolumeTest.java

* Update Volume.java
2024-09-30 23:24:24 +05:30
27343e7aa8 fix: handle Null Dereference in NthUglyNumber (#5469) 2024-09-24 23:30:38 +05:30
1460eb7bbe Add Manacher’s Algorithm for Longest Palindromic Substring (#5462)
* Added Manacher Algorithm

* Formatted ManacherTest.java

* Formatted Manacher.java

* Refactor: Update Manacher's algorithm tests and improve readability

- Added parameterized tests for longestPalindrome, empty cases, complex cases, and sentence palindromes.
- Removed unnecessary comments for cleaner code.
- Renamed variable `p` to `palindromeLengths` for clarity based on code review feedback.

---------

Co-authored-by: Ionut Hodoroaga <ionut.hodoroaga20@gmail.com>
2024-09-24 16:21:57 +03:00
18f6f8c30a fix: handle Null Dereference in RomanToInteger (#5461) 2024-09-23 11:33:55 +03:00
b849cbb602 fix: handle Null Dereference in UnitsConverter (#5460) 2024-09-22 11:20:23 +02:00
63fa04288b refactor: ColorContrastRatio (#5457) 2024-09-21 11:50:19 +03:00
e782c7ac3d style: use getOrDefault in MajorityElement (#5455) 2024-09-19 18:49:28 +03:00
7bde1523a5 style: use getOrDefault in MajorityElement (#5454) 2024-09-18 22:58:49 +02:00
648572a8c5 Refactor ProcessDetails and PreemptivePriorityScheduling (#5448)
* Refactor ProcessDetails and PreemptivePriorityScheduling for consistency

* fix formatting

* fix formatting

* Improve test readability and maintainability
2024-09-11 15:49:36 +03:00
65e32641fc refactor: InverseOfMatrix (#5446)
refactor: InverseOfMatrix
2024-09-09 10:15:41 +03:00
bded78f888 refactor: BFPRT (#5445)
refactor: adding javadocs and tests for BFPRT
2024-09-09 10:07:30 +03:00
a5b083cab0 Add SplayTree (#5142) 2024-09-01 23:25:34 +03:00
b0de93b3ce refactor: change packages (#5430)
* refactor: change package

* refactor: fix name

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 11:58:24 +02:00
f8ff6af893 refactor: BoardPath (#5431)
refactor: BoardPath

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 10:12:31 +02:00
c5b72816f3 refactor: MaximumSumOfDistinctSubarraysWithLengthK (#5433)
* refactor: MaximumSumOfDistinctSubarraysWithLengthK

* checkstyle: fix formatting

* checkstyle: fix formatting

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 10:03:43 +02:00
cd38531b0d refactor: SubsetSum (#5432)
* refactor: SubsetSum

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 09:55:18 +02:00
14916e692f refactor: WordLadder (#5434)
* refactor: WordLadder

* refactor: fix redundant check

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 09:49:55 +02:00
87cf89192b style: use proper spelling (#5436)
checkstyle: fix typos, style

Co-authored-by: alxkm <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-08-30 08:50:14 +02:00
d189c3a719 refactor: LeastCommonMultiple (#5435)
* refactor: LeastCommonMultiple

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-30 08:43:45 +02:00
c57e02dc85 refactor: DuplicateBrackets (#5424)
refactor: DuplicateBrackets

Co-authored-by: alxkm <alx@alx.com>
2024-08-29 19:21:05 +05:30
e2aaefebd5 refactor: CountWords (#5428)
* refactor: CountWords

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 22:34:46 +02:00
a23e9b0ba8 refactor: HashMap (#5426)
* refactor: HashMap

* checkstyle: fix formatting

* refactor: remove redundant comments

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 22:29:24 +02:00
6b7a1fdbe8 refactor: QueueUsingTwoStacks (#5427)
refactor: QueueUsingTwoStacks

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 22:25:46 +02:00
7d1847f51c refactor: PalindromicPartitioning (#5419)
refactor: PalindromicPartitioning

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 20:53:00 +02:00
0733075498 test: CountCharTest (#5423)
test: CountCharTest

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 18:45:23 +02:00
b2815db5cd refactor: LongestNonRepetitiveSubstring (#5421)
* refactor: LongestNonRepetitiveSubstring

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 18:40:27 +02:00
c413f3c6b2 refactor: LongestPalindromicSubstring (#5420)
* refactor: LongestPalindromicSubstring

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 18:35:21 +02:00
45563ccbde test: CircleLinkedListTest (#5422)
* test: CircleLinkedListTest

* checkstyle: fix formatting

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-28 18:31:39 +02:00
633b9d4112 refactor: PostfixToInfix (#5409)
* refactor: PostfixToInfix

* checkstyle: fix formatting

* refactor: add support for one character

---------

Co-authored-by: alxkm <alx@alx.com>
2024-08-27 15:03:26 +02:00