Skip to content

Commit

Permalink
Merge pull request #657 from xsduan98/master
Browse files Browse the repository at this point in the history
第51题.N皇后 修改Java代码
  • Loading branch information
youngyangyang04 authored Aug 26, 2021
2 parents 5b31add + e419a5f commit dd261c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/0051.N皇后.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class Solution {

public boolean isValid(int row, int col, int n, char[][] chessboard) {
// 检查列
for (int i=0; i<n; ++i) {
for (int i=0; i<row; ++i) { // 相当于剪枝
if (chessboard[i][col] == 'Q') {
return false;
}
Expand Down

0 comments on commit dd261c0

Please sign in to comment.