Refactor Code Style (#4151)

This commit is contained in:
Saurabh Rahate
2023-04-15 13:55:54 +05:30
committed by GitHub
parent 1ce907625b
commit 1dc388653a
100 changed files with 293 additions and 319 deletions

View File

@ -10,12 +10,12 @@ public class DeterminantOfMatrix {
// Determinant calculator
//@return determinant of the input matrix
static int determinant(int a[][], int n) {
static int determinant(int[][] a, int n) {
int det = 0, sign = 1, p = 0, q = 0;
if (n == 1) {
det = a[0][0];
} else {
int b[][] = new int[n - 1][n - 1];
int[][] b = new int[n - 1][n - 1];
for (int x = 0; x < n; x++) {
p = 0;
q = 0;
@ -44,7 +44,7 @@ public class DeterminantOfMatrix {
System.out.println("Enter matrix size (Square matrix only)");
int n = in.nextInt();
System.out.println("Enter matrix");
int a[][] = new int[n][n];
int[][] a = new int[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
a[i][j] = in.nextInt();

View File

@ -40,7 +40,7 @@ public class KrishnamurthyNumber {
}
}
public static void main(String args[]) throws IOException {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in)
);

View File

@ -19,7 +19,7 @@ public class NonRepeatingElement {
System.out.println("Array should contain even number of elements");
return;
}
int arr[] = new int[n];
int[] arr = new int[n];
System.out.println(
"Enter " +

View File

@ -39,7 +39,7 @@ public class TrinomialTriangle {
}
}
public static void main(String argc[]) {
public static void main(String[] argc) {
int n = 6;
printTrinomial(n);
}