mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-12-19 02:07:27 +08:00
backtracking -> word_search - replacing the example in doctest (#10188)
* Replacing the generator with numpy vector operations from lu_decomposition.
* Revert "Replacing the generator with numpy vector operations from lu_decomposition."
This reverts commit ad217c6616.
* Replacing the example in doctest with a less resource-intensive example.
This commit is contained in:
@@ -98,13 +98,7 @@ def word_exists(board: list[list[str]], word: str) -> bool:
|
||||
False
|
||||
>>> word_exists([["A"]], "A")
|
||||
True
|
||||
>>> word_exists([["A","A","A","A","A","A"],
|
||||
... ["A","A","A","A","A","A"],
|
||||
... ["A","A","A","A","A","A"],
|
||||
... ["A","A","A","A","A","A"],
|
||||
... ["A","A","A","A","A","B"],
|
||||
... ["A","A","A","A","B","A"]],
|
||||
... "AAAAAAAAAAAAABB")
|
||||
>>> word_exists([["B", "A", "A"], ["A", "A", "A"], ["A", "B", "A"]], "ABB")
|
||||
False
|
||||
>>> word_exists([["A"]], 123)
|
||||
Traceback (most recent call last):
|
||||
|
||||
Reference in New Issue
Block a user