MCPcopy Create free account
hub / github.com/ByteByteGoHq/coding-interview-patterns / NQueens

Method NQueens

csharp/Backtracking/NQueens.cs:5–10  ·  view source on GitHub ↗
(int n)

Source from the content-addressed store, hash-verified

3 int res = 0;
4
5 public int NQueens(int n)
6 {
7 dfs(0, new HashSet<int>(), new HashSet<int>(), new HashSet<int>(), n);
8
9 return res;
10 }
11
12 private void dfs(int r, ISet<int> diagonalsSet, ISet<int> antiDiagonalsSet, ISet<int> colsSet, int n)
13 {

Callers

nothing calls this directly

Calls 1

dfsFunction · 0.50

Tested by

no test coverage detected