Skip to content

Commit 0761aa5

Browse files
committed
Fixed operator wrap formatting
1 parent d6fea9b commit 0761aa5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ private static void getSolution(int boardSize, List<List<String>> solutions, int
102102
columns[columnIndex] = rowIndex;
103103

104104
// Skip current position if row or diagonal is already occupied
105-
if (OCCUPIED_ROWS.contains(rowIndex) ||
106-
OCCUPIED_DIAGONALS.contains(rowIndex - columnIndex) ||
107-
OCCUPIED_ANTI_DIAGONALS.contains(rowIndex + columnIndex)) {
105+
if (OCCUPIED_ROWS.contains(rowIndex)
106+
|| OCCUPIED_DIAGONALS.contains(rowIndex - columnIndex)
107+
|| OCCUPIED_ANTI_DIAGONALS.contains(rowIndex + columnIndex)) {
108108
continue;
109109
}
110110

0 commit comments

Comments
 (0)