Commit Graph

685 Commits

Author SHA1 Message Date
Piotr Idzik
5d00889291 fix: handle empty inputs in CircleSort (#5121)
* fix: handle empty inputs in `CircleSort`

* style: remove `main` method
2024-05-05 23:56:54 +05:30
SOZEL
dda3c9cb59 Refactor Levenshtein distance implementation (#5138)
* ref: refactor Levenshtein distance implementation
- Rewrite the original levenshtein distance implementation in functional style
- Add optimized version of levenshtein distance

* ref: make `LevenshteinDistance` class a proper utility

* ref: remove duplicated test data

* ref: update tests

---

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-05-04 11:13:30 +02:00
Piotr Idzik
b3903f5768 style: enable RedundantModifier in checkstyle (#5140) 2024-05-03 22:10:49 +03:00
marysiuniq
1e2d7e9431 style: enable ConstantName in checkstyle (#5139)
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
2024-05-02 18:31:37 +02:00
Piotr Idzik
f64bc3c65d style: include UC_USELESS_OBJECT (#5127) 2024-05-01 11:11:03 +00:00
marysiuniq
06a284f811 style: enable ModifierOrder in checkstyle (#5132)
* style: enable `ModifierOrder` in checkstyle

* style: remove redundant `final`

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

---------

Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-05-01 13:06:19 +02:00
Piotr Idzik
2513ccd62b style: include IM_AVERAGE_COMPUTATION_COULD_OVERFLOW (#5131) 2024-05-01 15:28:04 +05:30
Piotr Idzik
de18d0df7e style: enable EmptyStatement (#5120) 2024-04-26 22:39:03 +03:00
Piotr Idzik
6de154d218 tests: add tests of Mode (#5104) 2024-04-26 06:40:01 +00:00
marysiuniq
ac598e2b93 Remove unused import. (#5113)
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
2024-04-21 21:02:32 +02:00
marysiuniq
8129686e2e Added tests for FactorialRecursion (#5109)
* Added tests for `FactorialRecursion`

* Apply suggestions from code review

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

---------

Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-04-20 20:31:13 +02:00
marysiuniq
7201dc78ad Added tests for NumberOfDigits (#5107)
Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-04-13 20:45:07 +02:00
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
Kanivets Kateryna
22310defcd Cleaned up code for some packages (#5094)
* Cleaned up code of some packages

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-04-02 21:26:06 +02:00
Piotr Idzik
098f044370 Remove CalculateMaxOfMin (#5079) 2024-03-22 19:18:08 +08:00
SOZEL
192427a5d2 Parameterize references to generic types. (#5078)
* chore: remove unused imports

* fix: parameterize references to generic types


---------

Co-authored-by: vil02 <65706193+vil02@users.noreply.github.com>
2024-03-15 19:03:27 +01:00
SOZEL
ab371843ac Close Scanner to avoid resource leak (#5077) 2024-03-12 19:49:58 +01:00
straf10
47a9b1b647 Add WelshPowell (Graph Colouring) (#5034)
* Welsh Powell Algorithm + Test


---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-02-12 20:48:07 +01:00
VedantK
14b3f45f9f Add ExchangeSort (#5029)
* added ExchangeSort and its testcases

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-02-01 09:25:31 +01:00
Bhishmadev Ghosh
55f08cc013 Add tests SumOfSubset (#5021)
* Updated main and test

* removed

* style: reorder test cases

---------

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-01-26 19:30:26 +01:00
Piotr Idzik
a216cb8a59 Remove unused import from HashMapCuckooHashing (#5018)
style: remove unused import from `HashMapCuckooHashing`
2024-01-13 09:28:50 +00:00
Piotr Idzik
3528399b2e Remove unused import from JobSequencing (#5017)
style: remove unused import from `JobSequencing`
2024-01-13 10:26:44 +01:00
Piotr Idzik
ac7152d757 Remove unused imports from PerfectSquareTest (#5016)
style: remove unused imports from `PerfectSquareTest`
2024-01-13 09:21:57 +00:00
Piotr Idzik
9426053f73 Remove unused import from PowerOfTwoOrNotTest (#5015)
style: remove unused import from `PowerOfTwoOrNotTest.java`
2024-01-13 14:34:32 +05:30
Sarthak Chaudhary
8804cec957 Feature/4638 array right rotation (#5014)
* Create ArrayRightRotationTest.java

* Create ArrayRightRotation.java

* The updated one

* The updated one

* Added the test cases

* Added new test cases!

* Update ArrayRightRotation.java

* Update ArrayRightRotationTest.java
2024-01-13 13:59:30 +05:30
Piotr Idzik
19b7a22ec9 Remove unused imports from BoyerMooreTest (#5012) 2024-01-10 20:31:38 +02:00
mpousmali
fd84b0b10e Add SRTF Algorithm (#5011) 2024-01-08 23:48:11 +02:00
Piotr Idzik
570f7e7ef6 Remove unused import (#5010) 2024-01-08 23:44:32 +02:00
Nishant Jain
bb2fff0cbb Add package name (#5007) 2024-01-08 15:41:14 +02:00
Nishant Jain
0c881e39f2 Simplify minimizing lateness (#4999) 2024-01-08 15:34:36 +02:00
Piotr Idzik
8930ab5b16 Cleanup SumOfDigits and its tests (#4994) 2024-01-05 23:05:52 +02:00
Piotr Idzik
1ea95ffa92 Cleanup PerfectSquare and its tests (#4992) 2024-01-04 12:56:48 +02:00
Piotr Idzik
092ac5795b Remove SetKthBit in favor of SingleBitOperations.setBit (#4991) 2024-01-04 00:28:59 +02:00
AthinaSw
6a0c0585e4 Add cross-correlation and auto-correlation (#4984) 2024-01-03 20:11:07 +02:00
Govind Gupta
9bef5a169c Add Playfair Cipher (#4988) 2024-01-03 15:14:38 +02:00
Nishant Jain
a7d140a43e Add Set Kth Bit (#4990) 2024-01-02 20:18:01 +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
4aa8e6a0eb Updated TwoPSet to use Generics instead of Strings (#4981) 2023-12-11 20:58:56 +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
92131de377 Fix compare() for subset check (S.A ⊆ T.A) (#4978) 2023-12-07 18:06:56 +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
Nassor Shabataka
36580bac1e Fix typo in NextGraterElement (#4976) 2023-12-06 09:37:58 +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
Piotr Idzik
9bebcee5c7 Make sumOfDigits long in HarshadNumber.isHarshad (#4973)
fix: make `sumOfDigits` `long` in `HarshadNumber.isHarshad`
2023-11-30 22:06:31 +05:30
Piotr Idzik
fc21a8bffe Explicitly cast result of Math.pow to long in Armstrong (#4972) 2023-11-30 10:50:09 +02:00
Piotr Idzik
f8de290188 Explicitly cast result of Math.pow to int in BinaryToHexadecimal (#4970) 2023-11-29 23:30:59 +02:00
Piotr Idzik
361b4108ee Use explicit cast to int in FractionalKnapsack (#4971) 2023-11-29 23:21:25 +02:00