style: enable HideUtilityClassConstructor in checkstyle (#5147)

This commit is contained in:
Piotr Idzik
2024-05-08 08:58:29 +02:00
committed by GitHub
parent 030bb91d05
commit d3bb691f59
285 changed files with 895 additions and 339 deletions

View File

@ -7,7 +7,9 @@ import java.util.TreeSet;
* Finds all permutations of 1...n of length k
* @author TheClerici (<a href="https://github.com/TheClerici">git-TheClerici</a>)
*/
public class ArrayCombination {
public final class ArrayCombination {
private ArrayCombination() {
}
private static int length;
/**

View File

@ -9,7 +9,9 @@ import java.util.TreeSet;
* Finds all permutations of given array
* @author Alan Piao (<a href="https://github.com/cpiao3">git-Alan Piao</a>)
*/
public class Combination {
public final class Combination {
private Combination() {
}
private static int length;

View File

@ -26,7 +26,9 @@ import java.util.List;
51 46 55 44 53 4 21 12
*/
public class KnightsTour {
public final class KnightsTour {
private KnightsTour() {
}
private static final int BASE = 12;
private static final int[][] MOVES = {

View File

@ -14,7 +14,9 @@ class Node {
Set<Integer> edges = new HashSet<Integer>();
}
public class MColoring {
public final class MColoring {
private MColoring() {
}
static int possiblePaint(ArrayList<Node> nodes, int n, int m) {
// Create a visited array of n nodes

View File

@ -1,6 +1,8 @@
package com.thealgorithms.backtracking;
public class MazeRecursion {
public final class MazeRecursion {
private MazeRecursion() {
}
public static void mazeRecursion() {
// First create a 2 dimensions array to mimic a maze map

View File

@ -32,7 +32,9 @@ import java.util.List;
* queen is not placed safely. If there is no such way then return an empty list
* as solution
*/
public class NQueens {
public final class NQueens {
private NQueens() {
}
public static void main(String[] args) {
placeQueens(1);

View File

@ -7,7 +7,9 @@ import java.util.List;
* Finds all permutations of given array
* @author Alan Piao (<a href="https://github.com/cpiao3">Git-Alan Piao</a>)
*/
public class Permutation {
public final class Permutation {
private Permutation() {
}
/**
* Find all permutations of given array using backtracking