Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Hsinha11/Leetcode-solutions
/ solveNQueens
Method
solveNQueens
-51-N_Queens/Code.java:61–67 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
59
}
60
61
public
List<List<String>> solveNQueens(
int
n) {
62
int
[][] board =
new
int
[n][n];
63
List<String> v =
new
ArrayList<>();
64
List<List<String>> ans =
new
ArrayList<>();
65
solve(board, n, 0, v, ans);
66
return
ans;
67
}
68
}
Callers
nothing calls this directly
Calls
1
solve
Method · 0.95
Tested by
no test coverage detected