Commit Graph

146 Commits

Author SHA1 Message Date
Hardik Pawar
f34fe4d840 Enhance comments & improve readability in LongestCommonSubsequence.java (#5523) 2024-10-05 15:43:42 +03:00
Hardik Pawar
ce34595628 Improve TrieImp.java comments & enhance readability (#5526) 2024-10-05 12:47:52 +03:00
B Karthik
042d458d34 fix: change location of others to correct places (#5559) 2024-10-04 17:47:50 +00:00
Sailok Chinta
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
Hardik Pawar
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
Hardik Pawar
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
Hardik Pawar
de22158b80 Add tests for SkylineAlgorithm.java (#5556) 2024-10-04 19:26:18 +03:00
Luiz Carlos Jr
41f767ef94 Add XOR Cipher (#5490) 2024-10-04 16:10:18 +00:00
Hardik Pawar
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
Sailok Chinta
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
Hardik Pawar
ce6d98f8da Add Merge Intervals algorithm (#5516) 2024-10-03 10:07:44 +03:00
Tarun Vishwakarma
e493eb2958 Add Edmonds Blossom Algorithm (#5471) 2024-10-02 18:04:01 +00:00
B Karthik
e6f597acaf Add Gale-Shapley Algorithm and Tests (#5494) 2024-10-02 13:50:30 +00:00
Hardik Pawar
0bd86b3d7e Improve comments in ActivitySelection.java (#5485) 2024-10-02 13:34:52 +03:00
SOZEL
a5b083cab0 Add SplayTree (#5142) 2024-09-01 23:25:34 +03:00
Alex Klymenko
101cb950ae refactor: RootPrecision (#5383) 2024-08-25 11:34:12 +03:00
Alex Klymenko
7a5fe92b2a feat: FlashSort implementation (#5305) 2024-08-10 10:25:46 +03:00
Alex Klymenko
6e23e198ab feat: SpreadSort implementation (#5308) 2024-08-08 10:45:33 +03:00
Alex Klymenko
76a450fb75 feat: add PatienceSort (#5288)
* feat: PatienceSort

* refactor: fix readability issues,a and redundant check

---------

Co-authored-by: alxklm <alx@alx.com>
2024-07-24 17:32:47 +02:00
Alex Klymenko
97d416e64e refactor: cleanup StoogeSort (#5283)
* refactor: cleanup StoogeSort

* refactor: update DIRECTORY.md for StoogeSortTest

---------

Co-authored-by: Alex Klymenko <alx@alx.com>
2024-07-20 19:28:06 +00:00
Alex Klymenko
94032148ca refactor: cleanup RadixSort (#5280)
* refactor: refactoring RadixSort, adding test, update DIRECTORY.md

* checkstyle: fix formatting for test

* refactor: adding possibility to sort negative numbers. Improve tests. Improving code readability

* checkstyle: fix formatting

* refactor: resolve conflicts with master branch

* refactor: remove negative integers support

* checkstyle: fix formatting

* checkstyle: fix formatting, revert test

* refactor: adding return array to countDigits and buildOutput method, adding more specific description to javadocs

---------

Co-authored-by: Alex Klymenko <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-07-19 18:24:55 +02:00
dependabot[bot]
ff0eca3caa Chore(deps): bump org.apache.maven.plugins:maven-pmd-plugin from 3.23.0 to 3.24.0 (#5292) 2024-07-16 11:57:28 +03:00
Alex Klymenko
57878cac55 refactor: cleanup CycleSort (#5271)
* refactor: cleanup CycleSort. Adding test for it. Simplify code

* refactor: CycleSortTest to directory file

* tests: Adding more various tests cases for testing sorting algorithms

* checkstyle: imports and whitespaces fixes

* tests: removing boolean sorting

* checkstyle: fix "eedBraces: 'if' construct must use '{}'s"

* checkstyle: reduce "Too many static imports"

---------

Co-authored-by: Alex Klymenko <alx@alx.com>
2024-07-13 22:44:49 +05:30
Alex Klymenko
2d6c39ce10 feat: CountingSort implementation (#5287)
* feat: CountingSort

* checkstyle: fix formatting

* refactor: adding additional final modifiers

* refactor: restructure sorting, update docs and tests

* docs: typo fix

---------

Co-authored-by: Alex Klymenko <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-07-12 20:03:54 +02:00
Alex Klymenko
87e6184494 cleanup: removing wrong CountingSort implementation (#5284)
cleanup: removing CountingSort

Co-authored-by: Alex Klymenko <alx@alx.com>
2024-07-12 08:49:11 +02:00
Alex Klymenko
208e1e99f0 refactor: BubbleSortRecursion: improving naming, adding standard test (#5267)
* refactor: improving naming, adding standard test

* style: remove `BubbleSortRecursive` from pmd exclude list

* docs: typo fix

---------

Co-authored-by: Alex Klymenko <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-06-30 17:51:11 +00:00
Alex Klymenko
0087444e9f feat: add SelectionSortRecursive (#5255)
* Implementation: SelectionSort using recursion

* Documentation: adding links

* Fix issue with findMinIndex

* Fix: change findMinIndex method to recursive

* Fix: improve variable change scope

* Fix: Replacing recursive method findMinIndex with iterative. To fix StackOverFlow on huge arrays

* refactor: remove `null` check

* Fix: Removing redundant null check

---------

Co-authored-by: alxklm <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-06-28 09:18:06 +02:00
Alex Klymenko
7054535d36 feat: add WaveSort (#5252)
* Implementing WaveSort Algorithm

* Refactor: Tests to ParameterizedTest

* Checkstyle: Fix wrong align

* Checkstyle: Fix wrong align for second line

* Checkstyle: Remove redundant line

* Naming: fix method name

* Documentation: adding links

* Fix: adding test for isWaveSorted method

* Documentation: adding description for WaveSort

* Testing: test wave sort assert

* Checkstyle: remove redundant whitespace

* Checkstyle: remove redundant newline

* Testing: improving tests

---------

Co-authored-by: alxklm <alx@alx.com>
Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com>
2024-06-26 22:41:54 +02:00
StarDxxx
a81fb32e6c style: enable TypeName (#5214)
* style: enable `TypeName` in checkstyle

* style: enable `TypeName` in checkstyle

* Update directory

* style: use proper formatting

---------

Co-authored-by: StarDxxx <StarDxxx@users.noreply.github.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-06-08 13:37:20 +02:00
Bama Charan Chhandogi
37c2a96fe2 style: enable MissingSwitchDefault in checkstyle (#5179)
* Update directory

* Update directory

* Update directory

* Update directory

* add switch default

---------

Co-authored-by: BamaCharanChhandogi <BamaCharanChhandogi@users.noreply.github.com>
2024-05-26 17:28:00 +05:30
Piotr Idzik
90704d736b fix: update clang-format tag (#5095) 2024-04-08 23:08:31 +05:30
SOZEL
c53f178308 Implement Parentheses Generator (#5096)
* chore: add `ParenthesesGenerator` to `DIRECTORY.md`

* feat: implement Parentheses Generator

* ref: change `ParenthesesGenerator`s method to `static`

* ref: use parametrized tests

* ref: handling exception when `n < 0`

* chore: update docstrings

* ref: make `ParenthesesGenerator` to be a proper utility

* chore(docs): add private constructor docstring

* ref(tests): move bad name suggestions

* style: remove reduntant comments

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-04-05 18:41:27 +02:00
Piotr Idzik
098f044370 Remove CalculateMaxOfMin (#5079) 2024-03-22 19:18:08 +08:00
Govind Gupta
9bef5a169c Add Playfair Cipher (#4988) 2024-01-03 15:14:38 +02:00
aryan1165
7ece806cf5 Remove duplicate file of Simple Substitution Cipher (fixes #4494) (#4495) 2023-12-26 00:24:28 +02:00
Niklas Hoefflin
e26fd9da71 Add OR-Set (Observed-Remove Set) (#4980) 2023-12-11 23:05:43 +02:00
Niklas Hoefflin
b8b1dea38d Add LWW Element Set (Last Write Wins Element Set) (#4979) 2023-12-08 20:57:07 +02:00
Niklas Hoefflin
249ee1dc99 Add 2P-Set (Two-Phase Set) for both addition and removal operations in distributed systems (#4977) 2023-12-07 17:23:22 +02:00
Niklas Hoefflin
e59a3b1ebb Add G-Set (Grow-only Set) (#4975) 2023-12-05 20:39:18 +02:00
Niklas Hoefflin
3001620c1e Add PN-Counter (#4974) 2023-12-04 18:22:02 +02:00
Niklas Hoefflin
e759544c33 Add Boruvka's algorithm to find Minimum Spanning Tree (#4964) 2023-12-02 19:53:17 +02:00
Ricardo Ramos
e9bbf35ff9 Add FloorTest and clean-up Floor (#4769)
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Ricardo Ramos <0102016812@grupotel.corp>
2023-10-12 00:21:53 +03:00
SwargaRajDutta
af80c8005d Add Sliding Window Problem (#4322) 2023-08-18 14:08:40 +00:00
Bama Charan Chhandogi
1ef5208b75 Add M-coloring Problem (#4282)
Co-authored-by: BamaCharanChhandogi <b.c.chhandogi@gmailcom>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
Co-authored-by: Debasish Biswas <debasishbsws.abc@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-08-05 22:00:26 +03:00
Albina Gimaletdinova
fc274c84f8 Fix style in AmicableNumbers (#4263) 2023-07-26 16:52:46 +03:00
Albina Gimaletdinova
dec3b98e4b Refactor FibonacciJavaStreams and add unit tests (#4260) 2023-07-25 22:42:09 +03:00
Albina Gimaletdinova
2456d86432 Add unit tests for ParseInteger (#4228) 2023-07-02 11:31:55 +03:00
Albina Gimaletdinova
4b45ac7e71 Add unit tests for PalindromeNumber (#4227) 2023-07-01 18:29:10 +00:00
Albina Gimaletdinova
8862a4dea5 Add unit tests for FibonacciNumberCheck (#4225) 2023-07-01 20:52:52 +03:00
Albina Gimaletdinova
bc699b86e5 Refactor BinaryTreeIsBalanced algorithm (#4222) 2023-06-26 22:26:17 +08:00