mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
style: enable HideUtilityClassConstructor
in checkstyle (#5147)
This commit is contained in:
@ -9,7 +9,9 @@ import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.PriorityQueue;
|
||||
|
||||
public class A_Star {
|
||||
public final class A_Star {
|
||||
private A_Star() {
|
||||
}
|
||||
|
||||
private static class Graph {
|
||||
|
||||
|
@ -14,7 +14,9 @@ import java.util.Arrays;
|
||||
*
|
||||
* Output : YES
|
||||
*/
|
||||
public class BipartiteGrapfDFS {
|
||||
public final class BipartiteGrapfDFS {
|
||||
private BipartiteGrapfDFS() {
|
||||
}
|
||||
|
||||
private static boolean bipartite(int V, ArrayList<ArrayList<Integer>> adj, int[] color, int node) {
|
||||
if (color[node] == -1) {
|
||||
|
@ -107,7 +107,9 @@ class Graph<E extends Comparable<E>> {
|
||||
}
|
||||
}
|
||||
|
||||
public class ConnectedComponent {
|
||||
public final class ConnectedComponent {
|
||||
private ConnectedComponent() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Graph<Character> graphChars = new Graph<>();
|
||||
|
@ -78,7 +78,9 @@ class Cycle {
|
||||
}
|
||||
}
|
||||
|
||||
public class Cycles {
|
||||
public final class Cycles {
|
||||
private Cycles() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Cycle c = new Cycle();
|
||||
|
@ -120,7 +120,9 @@ class AdjacencyListGraph<E extends Comparable<E>> {
|
||||
}
|
||||
}
|
||||
|
||||
public class Graphs {
|
||||
public final class Graphs {
|
||||
private Graphs() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
AdjacencyListGraph<Integer> graph = new AdjacencyListGraph<>();
|
||||
|
@ -130,7 +130,9 @@ class TopologicalSort<E extends Comparable<E>> {
|
||||
/**
|
||||
* A driver class that sorts a given graph in topological order.
|
||||
*/
|
||||
public class KahnsAlgorithm {
|
||||
public final class KahnsAlgorithm {
|
||||
private KahnsAlgorithm() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Graph definition and initialization
|
||||
|
@ -12,7 +12,9 @@ import java.util.Queue;
|
||||
*
|
||||
* @author Unknown
|
||||
*/
|
||||
public class MatrixGraphs {
|
||||
public final class MatrixGraphs {
|
||||
private MatrixGraphs() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(10);
|
||||
|
Reference in New Issue
Block a user