mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +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)
|
||||
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)]
|
||||
|
@ -91,7 +91,7 @@ def open_knight_tour(n: int) -> list[list[int]]:
|
|||
return board
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user