mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-22 03:24:57 +08:00
style: enable InvalidJavadocPosition
in checkstyle (#5237)
enable style InvalidJavadocPosition Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:

committed by
GitHub

parent
39e065437c
commit
74e51990c1
@ -1,15 +1,14 @@
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
import java.util.Scanner;
|
||||
/**
|
||||
* This file contains an implementation of finding the nth CATALAN NUMBER using
|
||||
* dynamic programming Wikipedia: https://en.wikipedia.org/wiki/Catalan_number
|
||||
* dynamic programming : <a href="https://en.wikipedia.org/wiki/Catalan_number">Wikipedia</a>
|
||||
*
|
||||
* Time Complexity: O(n^2) Space Complexity: O(n)
|
||||
*
|
||||
* @author AMRITESH ANAND (https://github.com/amritesh19)
|
||||
* @author <a href="https://github.com/amritesh19">AMRITESH ANAND</a>
|
||||
*/
|
||||
import java.util.Scanner;
|
||||
|
||||
public final class CatalanNumber {
|
||||
private CatalanNumber() {
|
||||
}
|
||||
@ -31,7 +30,7 @@ public final class CatalanNumber {
|
||||
catalanArray[0] = 1;
|
||||
catalanArray[1] = 1;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The Catalan numbers satisfy the recurrence relation C₀=1 and Cn = Σ
|
||||
* (Ci * Cn-1-i), i = 0 to n-1 , n > 0
|
||||
*/
|
||||
|
@ -1,20 +1,14 @@
|
||||
/**
|
||||
* Author : Siddhant Swarup Mallick
|
||||
* Github : https://github.com/siddhant2002
|
||||
*/
|
||||
/**
|
||||
* In mathematics, the Golomb sequence is a non-decreasing integer sequence where n-th term is equal
|
||||
* to number of times n appears in the sequence.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Wikipedia Link - https://en.wikipedia.org/wiki/Golomb_sequence
|
||||
*/
|
||||
|
||||
/** Program description - To find the Golomb sequence upto n */
|
||||
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/siddhant2002">Siddhant Swarup Mallick</a>
|
||||
|
||||
* In mathematics, the Golomb sequence is a non-decreasing integer sequence where n-th term is equal
|
||||
* to number of times n appears in the sequence.
|
||||
|
||||
* <a href="https://en.wikipedia.org/wiki/Golomb_sequence">Wikipedia</a>
|
||||
* Program description - To find the Golomb sequence upto n
|
||||
*/
|
||||
public final class CountFriendsPairing {
|
||||
private CountFriendsPairing() {
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
import java.util.Scanner;
|
||||
/**
|
||||
* A DynamicProgramming based solution for Edit Distance problem In Java
|
||||
* Description of Edit Distance with an Example:
|
||||
@ -22,8 +23,6 @@ package com.thealgorithms.dynamicprogramming;
|
||||
*
|
||||
* @author SUBHAM SANGHAI
|
||||
*/
|
||||
import java.util.Scanner;
|
||||
|
||||
public final class EditDistance {
|
||||
private EditDistance() {
|
||||
}
|
||||
|
@ -1,15 +1,20 @@
|
||||
/**
|
||||
* Author : Siddhant Swarup Mallick
|
||||
* Github : https://github.com/siddhant2002
|
||||
*/
|
||||
|
||||
/** Program description - To find the maximum subarray sum */
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/siddhant2002">Siddhant Swarup Mallick</a>
|
||||
* Program description - To find the maximum subarray sum
|
||||
*/
|
||||
public final class KadaneAlgorithm {
|
||||
private KadaneAlgorithm() {
|
||||
}
|
||||
|
||||
/**
|
||||
* OUTPUT :
|
||||
* Input - {89,56,98,123,26,75,12,40,39,68,91}
|
||||
* Output: it returns either true or false
|
||||
* 1st approach Time Complexity : O(n)
|
||||
* Auxiliary Space Complexity : O(1)
|
||||
*/
|
||||
public static boolean maxSum(int[] a, int predictedAnswer) {
|
||||
int sum = a[0];
|
||||
int runningSum = 0;
|
||||
@ -28,11 +33,4 @@ public final class KadaneAlgorithm {
|
||||
// It returns true if sum and predicted answer matches
|
||||
// The predicted answer is the answer itself. So it always return true
|
||||
}
|
||||
/**
|
||||
* OUTPUT :
|
||||
* Input - {89,56,98,123,26,75,12,40,39,68,91}
|
||||
* Output: it returns either true or false
|
||||
* 1st approach Time Complexity : O(n)
|
||||
* Auxiliary Space Complexity : O(1)
|
||||
*/
|
||||
}
|
||||
|
@ -1,13 +1,10 @@
|
||||
/**
|
||||
* Author : Siddhant Swarup Mallick
|
||||
* Github : https://github.com/siddhant2002
|
||||
*/
|
||||
|
||||
/** Program description - To find the New Man Shanks Prime. */
|
||||
/** Wikipedia Link - https://en.wikipedia.org/wiki/Newman%E2%80%93Shanks%E2%80%93Williams_prime */
|
||||
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/siddhant2002">Siddhant Swarup Mallick</a>
|
||||
* Program description - To find the New Man Shanks Prime.
|
||||
* <a href="https://en.wikipedia.org/wiki/Newman%E2%80%93Shanks%E2%80%93Williams_prime">Wikipedia</a>
|
||||
*/
|
||||
public final class NewManShanksPrime {
|
||||
private NewManShanksPrime() {
|
||||
}
|
||||
|
@ -6,8 +6,6 @@ package com.thealgorithms.dynamicprogramming;
|
||||
* cover the entire text ?-> matches single characters *-> match the sequence of
|
||||
* characters
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* For calculation of Time and Space Complexity. Let N be length of src and M be
|
||||
* length of pat
|
||||
*
|
||||
|
@ -3,8 +3,8 @@ package com.thealgorithms.dynamicprogramming;
|
||||
/**
|
||||
* Find the number of subsets present in the given array with a sum equal to target.
|
||||
* Based on Solution discussed on
|
||||
* StackOverflow(https://stackoverflow.com/questions/22891076/count-number-of-subsets-with-sum-equal-to-k)
|
||||
* @author Samrat Podder(https://github.com/samratpodder)
|
||||
* <a href="https://stackoverflow.com/questions/22891076/count-number-of-subsets-with-sum-equal-to-k">StackOverflow</a>
|
||||
* @author <a href="https://github.com/samratpodder">Samrat Podder</a>
|
||||
*/
|
||||
public final class SubsetCount {
|
||||
private SubsetCount() {
|
||||
@ -19,7 +19,7 @@ public final class SubsetCount {
|
||||
*
|
||||
*/
|
||||
public static int getCount(int[] arr, int target) {
|
||||
/**
|
||||
/*
|
||||
* Base Cases - If target becomes zero, we have reached the required sum for the subset
|
||||
* If we reach the end of the array arr then, either if target==arr[end], then we add one to
|
||||
* the final count Otherwise we add 0 to the final count
|
||||
|
Reference in New Issue
Block a user