mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
style: enable MethodName in CheckStyle (#5182)
enabled: MethodName in CheckStyle
This commit is contained in:
committed by
GitHub
parent
ea4dc15a24
commit
295e7436b1
@@ -11,7 +11,7 @@ public final class TrinomialTriangle {
|
||||
private TrinomialTriangle() {
|
||||
}
|
||||
|
||||
public static int TrinomialValue(int n, int k) {
|
||||
public static int trinomialValue(int n, int k) {
|
||||
if (n == 0 && k == 0) {
|
||||
return 1;
|
||||
}
|
||||
@@ -20,17 +20,17 @@ public final class TrinomialTriangle {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (TrinomialValue(n - 1, k - 1) + TrinomialValue(n - 1, k) + TrinomialValue(n - 1, k + 1));
|
||||
return (trinomialValue(n - 1, k - 1) + trinomialValue(n - 1, k) + trinomialValue(n - 1, k + 1));
|
||||
}
|
||||
|
||||
public static void printTrinomial(int n) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int j = -i; j <= 0; j++) {
|
||||
System.out.print(TrinomialValue(i, j) + " ");
|
||||
System.out.print(trinomialValue(i, j) + " ");
|
||||
}
|
||||
|
||||
for (int j = 1; j <= i; j++) {
|
||||
System.out.print(TrinomialValue(i, j) + " ");
|
||||
System.out.print(trinomialValue(i, j) + " ");
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
|
||||
Reference in New Issue
Block a user