ce4eb55e0e
refactor: FloydTriangle
( #5367 )
2024-08-23 15:55:13 +03:00
74e51990c1
style: enable InvalidJavadocPosition
in checkstyle ( #5237 )
...
enable style InvalidJavadocPosition
Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
2024-06-18 19:34:22 +02:00
9973b8efc8
refactor: redesign StringMatchFiniteAutomata
( #5222 )
...
* refactor
* add test
* fix clang
* fix pmd
* remove main method
* refactor searchPattern with private class
* fix checkstyle
* Update src/main/java/com/thealgorithms/others/StringMatchFiniteAutomata.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
* Update src/main/java/com/thealgorithms/others/StringMatchFiniteAutomata.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
* Update src/main/java/com/thealgorithms/others/StringMatchFiniteAutomata.java
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
* fix clang
* tests: add more test cases
---------
Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-06-17 20:55:20 +00:00
87b17e0571
style: enable NeedBraces
in checkstyle ( #5227 )
...
* enable style NeedBraces
* style: enable NeedBraces in checkstyle
---------
Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
2024-06-13 21:00:16 +02:00
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
440f3ce18b
style: include MAC_MANUAL_ARRAY_COPY
( #5199 )
2024-06-04 21:02:38 +00:00
c42b1c940c
style: enable ParameterName
in CheckStyle. ( #5196 )
...
* Enabled: ParameterName in CheckStyle.
* Refactored to fix bug caused by selfAssignment of variables in VectorCrossproduct class
2024-05-31 22:01:11 +02:00
25d711c5d8
style: enable LocalVariableName
in CheckStyle ( #5191 )
...
* style: enable LocalVariableName in checkstyle
* Removed minor bug
* Resolved Method Name Bug
* Changed names according to suggestions
2024-05-28 20:29:28 +02:00
295e7436b1
style: enable MethodName
in CheckStyle ( #5182 )
...
enabled: MethodName in CheckStyle
2024-05-27 09:06:06 +02:00
ea4dc15a24
style: do not suppress try
( #5167 )
2024-05-27 03:02:36 +05:30
9eaa2bb756
style: enable MultipleVariableDeclarations
in checkstyle ( #5175 )
...
Co-authored-by: vaibhav <vaibhav.waghmare@techprescient.com>
2024-05-25 20:18:27 +02:00
44ce6e7b0d
style: enable StaticVariableName
in checkstyle ( #5173 )
...
* style: enable StaticVariableName in checkstyle
* Refractored: enable StaticVariableName in checkstyle
* style: mark more variables as `final`
---------
Co-authored-by: vaibhav <vaibhav.waghmare@techprescient.com>
Co-authored-by: vil02 <vil02@o2.pl>
2024-05-25 14:09:14 +00:00
0f42e995a4
style: enabled InnerAssignment
in checkstyle ( #5162 )
...
* style: enabled InnerAssignment in checkstyle
* Refactor code formatting in KnapsackMemoization.java and UnionFind.java
* style: remove redundant blank line
* style: mark `includeCurrentItem` and `excludeCurrentItem` as `final`
* style: remove `KnapsackMemoization` from `pmd-exclude.properties`
* style: use `final`
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2024-05-16 16:46:03 +00:00
bbe4a025df
style: enable FinalClass
in checkstyle ( #5154 )
2024-05-11 08:50:05 +02:00
27c0978851
style: include VA_FORMAT_STRING_USES_NEWLINE
( #5151 )
2024-05-09 17:21:04 +02:00
ee6924a2a0
style: include PATH_TRAVERSAL_IN
( #5148 )
2024-05-09 20:04:57 +05:30
d3bb691f59
style: enable HideUtilityClassConstructor
in checkstyle ( #5147 )
2024-05-08 09:58:29 +03:00
414835db11
style: enable AvoidStarImport
in checkstyle ( #5141 )
2024-05-05 20:48:56 +02:00
b3903f5768
style: enable RedundantModifier
in checkstyle ( #5140 )
2024-05-03 22:10:49 +03:00
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
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
ab371843ac
Close Scanner
to avoid resource leak ( #5077 )
2024-03-12 19:49:58 +01:00
574138c7a3
Cleanup BoyerMoore
( #4951 )
...
* modify code to make use of java Optional class
* revert changes
* add java.util.Optional<Integer>
* add java.util.Optional
* refactors: make `findmajor` return `optional`
* refactors: make method name findMajor and split it
* refactors: change method name in tests
* Apply suggestions from code review
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
* change back to int
* fix: swap arguments
* tests: add some test cases
* refactor: add `isMajority` and avoid rounding
* style: use `var`
* style: swap arguments of `countOccurrences`
---------
Co-authored-by: vil02 <vil02@o2.pl>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
2023-10-31 09:07:59 +01:00
945e7b56bb
Fix:/Number of count of major element in Boyer Moore algorithm ( #4728 )
...
* Number of count of major element in Boyer Moore algorithm
* test: add `BoyerMooreTest`
* style: basic linting
* tests: add test case from the issue
---------
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
Co-authored-by: vil02 <vil02@o2.pl>
2023-10-30 18:24:23 +01:00
26c2465328
Moved StackPostfixNotation.java from the Others section to the Stack section ( #4372 )
...
* Moved StackPostfixNotation.java from the Others section to the Stack section
* Put all stack related algo in a separate stack directory in the algorithms directory. The stack directory under data-structures now only contains various implementations of the stack data structure.
* formatted files
2023-09-18 21:27:36 +02:00
af80c8005d
Add Sliding Window Problem ( #4322 )
2023-08-18 14:08:40 +00:00
de50fc0294
Simplify StackPostfixNotation.postfixEvaluate
( #4264 )
2023-07-26 20:16:52 +03:00
e5c7a08874
Handle inputs like "2 +"
in StackPostfixNotation
( #4262 )
2023-07-26 14:11:28 +03:00
44dcebb699
Handle incorrect inputs in StackPostfixNotation
( #4261 )
2023-07-26 06:20:56 +00:00
2488a2ad51
Code cleanup ( #4246 )
2023-07-22 15:23:00 +00:00
63739f4933
refactor: simplify HammingDistance
( #4218 )
...
* refactor: make HammingDistance an utility class
* tests: add some tests, simplify logic of some
* refator: simplify logic in HammingDistance
* style: remove logging messages
2023-06-21 21:11:13 +05:30
7a3273ae1d
tests: add tests for SieveOfEratosthenes
( #4217 )
...
* tests: add tests for SieveOfEratosthenes
* feat: throw for inputs <= 0
* refactor: simplify logic in SieveOfEratosthenes.findPrimesTill
* refactor: make SieveOfEratosthenes a utility class
* docs: update docs, fix typo
2023-06-20 23:58:53 +05:30
87d6083bac
Add tests for EulersFunction ( #4216 )
2023-06-19 20:46:54 +03:00
415a04ea7f
Add automatic linter ( #4214 )
2023-06-09 20:05:14 +08:00
00282efd8b
style: format code ( #4212 )
...
close #4204
2023-06-09 18:52:05 +08:00
ad03086f54
Remove main and add tests for CountWords ( #4210 )
2023-06-02 16:28:33 +00:00
5d7a59654f
Refactor LowestBasePalindrome ( #4207 )
2023-05-29 23:05:23 +03:00
bb830e9559
Add tests for TwoSumProblem and reduce duplication ( fixes #4177 ) ( #4176 )
2023-05-02 20:03:21 +03:00
db9c78a598
Remove duplicated ThreeSum problem ( fixes #4169 ) ( #4170 )
2023-04-29 10:17:00 +03:00
1551b8f50b
Add line sweep algorithm ( #4157 )
2023-04-19 08:12:30 +00:00
1dc388653a
Refactor Code Style ( #4151 )
2023-04-15 11:25:54 +03:00
181906d5f7
Refactor Code (MemoryManagementAlgorithms): Pull Up Variable ( #4145 )
2023-04-12 15:18:49 +00:00
f35e9a7d81
Update SieveOfEratosthenes.java ( #4149 )
2023-04-07 20:50:43 +08:00
ad72c28d91
Remove unnecessary code ( #4141 )
2023-04-03 22:35:59 +08:00
b6c1d250f4
Add Conway Sequence ( #3807 )
...
Co-authored-by: Bruno Eloi <bruno.eloi@minfin.fed.be>
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
2023-01-14 12:22:15 +02:00
d5f140458a
Add two algorithms with matrixes ( #3364 )
2023-01-14 10:01:03 +00:00
44c05bf7db
Add Shortest Job First Scheduling ( #3843 )
2023-01-13 21:22:45 +02:00
b8d6b1a9b0
Create CRC16.java ( #3733 )
...
* Create CRC16.java
* Create CRC16Test.java
2022-11-09 10:20:54 +05:30
c805437c0c
Add tests for CountChar ( #3334 )
2022-10-12 18:42:24 +00:00
e96f567bfc
Format code with prettier ( #3375 )
2022-10-03 17:23:00 +08:00