Skip to content

Commit

Permalink
backtracking -> word_search - replacing the example in doctest (#10188)
Browse files Browse the repository at this point in the history
* Replacing the generator with numpy vector operations from lu_decomposition.

* Revert "Replacing the generator with numpy vector operations from lu_decomposition."

This reverts commit ad217c6.

* Replacing the example in doctest with a less resource-intensive example.
  • Loading branch information
quant12345 authored Oct 10, 2023
1 parent b9a797f commit 7b996e2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backtracking/word_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7b996e2

Please sign in to comment.