style: enable MultipleVariableDeclarations in checkstyle (#5175)

Co-authored-by: vaibhav <vaibhav.waghmare@techprescient.com>
This commit is contained in:
vaibhav9t1
2024-05-25 23:48:27 +05:30
committed by GitHub
parent 44ce6e7b0d
commit 9eaa2bb756
82 changed files with 299 additions and 121 deletions

View File

@@ -10,7 +10,8 @@ public final class EggDropping {
// min trials with n eggs and m floors
public static int minTrials(int n, int m) {
int[][] eggFloor = new int[n + 1][m + 1];
int result, x;
int result;
int x;
for (int i = 1; i <= n; i++) {
eggFloor[i][0] = 0; // Zero trial for zero floor.
@@ -41,7 +42,8 @@ public final class EggDropping {
}
public static void main(String[] args) {
int n = 2, m = 4;
int n = 2;
int m = 4;
// result outputs min no. of trials in worst case for n eggs and m floors
int result = minTrials(n, m);
System.out.println(result);