Skip to content

Commit 66760e3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0dd2b8d commit 66760e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backtracking/word_search_path.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ def get_word_path(
6565
>>> # 1. Find "CATS" starting at (0,0). Initial key is 0.
6666
>>> get_word_path(board, "CATS", 0, 0, 0, {0}, [])
6767
[(0, 0), (0, 1), (0, 2), (1, 2)]
68-
69-
>>> # 2. Find "BC" starting at (2,1).
68+
69+
>>> # 2. Find "BC" starting at (2,1).
7070
>>> # Key for (2,1) in 3x3 is: (3 * 3 * 2) + 1 = 19
7171
>>> get_word_path(board, "BC", 2, 1, 0, {19}, [])
7272
[(2, 1), (2, 2)]
73-
73+
7474
>>> # 3. Partial search: current_path already has (0,0), looking for "ATS" starting at (0,1)
7575
>>> # Key for (0,1) is 1. Visited includes the 'C' at key 0.
7676
>>> get_word_path(board, "ATS", 0, 1, 0, {0, 1}, [(0, 0)])

0 commit comments

Comments
 (0)