mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 15:01:08 +00:00
Add doctest to is_safe function (#11183)
This commit is contained in:
parent
154e5e8681
commit
b860003576
|
@ -24,6 +24,10 @@ def is_safe(board: list[list[int]], row: int, column: int) -> bool:
|
||||||
Returns:
|
Returns:
|
||||||
Boolean Value
|
Boolean Value
|
||||||
|
|
||||||
|
>>> is_safe([[0, 0, 0], [0, 0, 0], [0, 0, 0]], 1, 1)
|
||||||
|
True
|
||||||
|
>>> is_safe([[1, 0, 0], [0, 0, 0], [0, 0, 0]], 1, 1)
|
||||||
|
False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
n = len(board) # Size of the board
|
n = len(board) # Size of the board
|
||||||
|
|
Loading…
Reference in New Issue
Block a user