mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): remove hidden tests in N queens lab (#65949)
This commit is contained in:
+8
-7
@@ -80,7 +80,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert dfs_n_queens(1) == [[0]]
|
||||
assert dfs_n_queens(5) == [[0, 2, 4, 1, 3], [0, 3, 1, 4, 2], [1, 3, 0, 2, 4], [1, 4, 2, 0, 3], [2, 0, 3, 1, 4], [2, 4, 1, 3, 0], [3, 0, 2, 4, 1], [3, 1, 4, 2, 0], [4, 1, 3, 0, 2], [4, 2, 0, 3, 1]]
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -89,7 +88,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert dfs_n_queens(2) == []
|
||||
assert dfs_n_queens(5) == [[0, 2, 4, 1, 3], [0, 3, 1, 4, 2], [1, 3, 0, 2, 4], [1, 4, 2, 0, 3], [2, 0, 3, 1, 4], [2, 4, 1, 3, 0], [3, 0, 2, 4, 1], [3, 1, 4, 2, 0], [4, 1, 3, 0, 2], [4, 2, 0, 3, 1]]
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -98,7 +96,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert dfs_n_queens(3) == []
|
||||
assert dfs_n_queens(5) == [[0, 2, 4, 1, 3], [0, 3, 1, 4, 2], [1, 3, 0, 2, 4], [1, 4, 2, 0, 3], [2, 0, 3, 1, 4], [2, 4, 1, 3, 0], [3, 0, 2, 4, 1], [3, 1, 4, 2, 0], [4, 1, 3, 0, 2], [4, 2, 0, 3, 1]]
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -107,7 +104,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert dfs_n_queens(4) == [[1, 3, 0, 2], [2, 0, 3, 1]]
|
||||
assert dfs_n_queens(5) == [[0, 2, 4, 1, 3], [0, 3, 1, 4, 2], [1, 3, 0, 2, 4], [1, 4, 2, 0, 3], [2, 0, 3, 1, 4], [2, 4, 1, 3, 0], [3, 0, 2, 4, 1], [3, 1, 4, 2, 0], [4, 1, 3, 0, 2], [4, 2, 0, 3, 1]]
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -116,7 +112,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert dfs_n_queens(5) == [[0, 2, 4, 1, 3], [0, 3, 1, 4, 2], [1, 3, 0, 2, 4], [1, 4, 2, 0, 3], [2, 0, 3, 1, 4], [2, 4, 1, 3, 0], [3, 0, 2, 4, 1], [3, 1, 4, 2, 0], [4, 1, 3, 0, 2], [4, 2, 0, 3, 1]]
|
||||
assert dfs_n_queens(3) == []
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -125,7 +120,6 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert len(dfs_n_queens(5)) == 10
|
||||
assert len(dfs_n_queens(6)) == 4
|
||||
`) })
|
||||
```
|
||||
|
||||
@@ -134,8 +128,15 @@ The function should return a list of solutions, where each solution is a list of
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert len(dfs_n_queens(8)) == 92
|
||||
assert len(dfs_n_queens(5)) == 10
|
||||
`) })
|
||||
```
|
||||
|
||||
`dfs_n_queens` should return the correct result.
|
||||
|
||||
```js
|
||||
({ test: () => runPython(`
|
||||
assert len(dfs_n_queens(7)) == 40
|
||||
assert dfs_n_queens(6) == [[1, 3, 5, 0, 2, 4], [2, 5, 1, 4, 0, 3], [3, 0, 4, 1, 5, 2], [4, 2, 0, 5, 3, 1]]
|
||||
`) })
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user