mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-18 01:00:15 +00:00
Fix typo in knight_tour.py (#11173)
This commit is contained in:
parent
3999abfea3
commit
b8e7a4c76c
|
@ -79,7 +79,7 @@ def open_knight_tour(n: int) -> list[list[int]]:
|
||||||
>>> open_knight_tour(2)
|
>>> open_knight_tour(2)
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
ValueError: Open Kight Tour cannot be performed on a board of size 2
|
ValueError: Open Knight Tour cannot be performed on a board of size 2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
board = [[0 for i in range(n)] for j in range(n)]
|
board = [[0 for i in range(n)] for j in range(n)]
|
||||||
|
@ -91,7 +91,7 @@ def open_knight_tour(n: int) -> list[list[int]]:
|
||||||
return board
|
return board
|
||||||
board[i][j] = 0
|
board[i][j] = 0
|
||||||
|
|
||||||
msg = f"Open Kight Tour cannot be performed on a board of size {n}"
|
msg = f"Open Knight Tour cannot be performed on a board of size {n}"
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user