Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Replacing the example in doctest with a less resource-intensive example.
  • Loading branch information
quant12345 committed Oct 9, 2023
commit d5906d86c2755ee81b24ba5a7961090fc0bc3f1a
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