Skip to content

Commit c2d5827

Browse files
applied clang format
1 parent cb03bc9 commit c2d5827

File tree

98 files changed

+3942
-3988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3942
-3988
lines changed

src/main/java/com/thealgorithms/backtracking/CrosswordSolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static boolean solveCrossword(char[][] puzzle, Collection<String> words)
104104
for (int col = 0; col < puzzle[0].length; col++) {
105105
if (puzzle[row][col] == ' ') {
106106
for (String word : new ArrayList<>(remainingWords)) {
107-
for (boolean vertical : new boolean[]{true, false}) {
107+
for (boolean vertical : new boolean[] {true, false}) {
108108
if (isValid(puzzle, word, row, col, vertical)) {
109109
placeWord(puzzle, word, row, col, vertical);
110110
remainingWords.remove(word);

src/main/java/com/thealgorithms/backtracking/KnightsTour.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ private KnightsTour() {
2525

2626
// Possible moves for a knight in chess
2727
private static final int[][] MOVES = {
28-
{1, -2},
29-
{2, -1},
30-
{2, 1},
31-
{1, 2},
32-
{-1, 2},
33-
{-2, 1},
34-
{-2, -1},
35-
{-1, -2},
28+
{1, -2},
29+
{2, -1},
30+
{2, 1},
31+
{1, 2},
32+
{-1, 2},
33+
{-2, 1},
34+
{-2, -1},
35+
{-1, -2},
3636
};
3737

3838
// Chess grid representing the board
@@ -109,7 +109,7 @@ static List<int[]> neighbors(int row, int column) {
109109
int y = m[1];
110110
if (row + y >= 0 && row + y < BASE && column + x >= 0 && column + x < BASE && grid[row + y][column + x] == 0) {
111111
int num = countNeighbors(row + y, column + x);
112-
neighbour.add(new int[]{row + y, column + x, num});
112+
neighbour.add(new int[] {row + y, column + x, num});
113113
}
114114
}
115115
return neighbour;

0 commit comments

Comments
 (0)