Code cleanup (#4246)

This commit is contained in:
HManiac74
2023-07-22 17:23:00 +02:00
committed by GitHub
parent 3facb0d862
commit 2488a2ad51
52 changed files with 50 additions and 167 deletions

View File

@ -44,5 +44,6 @@ public class BoyerMoore {
a[i] = input.nextInt();
}
System.out.println("the majority element is " + findmajor(a));
input.close();
}
}

View File

@ -1,7 +1,5 @@
package com.thealgorithms.others;
import java.util.Scanner;
/**
* @author Marcus
*/

View File

@ -19,6 +19,7 @@ public class HappyNumbersSeq {
}
String res = n == 1 ? "1 Happy number" : "Sad number";
System.out.println(res);
in.close();
}
private static int sumSquares(int n) {

View File

@ -118,5 +118,6 @@ public class Huffman {
// print the codes by traversing the tree
printCode(root, "");
s.close();
}
}

View File

@ -22,8 +22,7 @@ class Rotate_by_90_degree {
}
}
Rotate g = new Rotate();
g.rotate(arr);
Rotate.rotate(arr);
printMatrix(arr);
}
sc.close();

View File

@ -1,8 +1,5 @@
package com.thealgorithms.others.cn;
import java.util.ArrayList;
import java.util.List;
final public class HammingDistance {
private HammingDistance() {
}