Skip to content

Commit

Permalink
Merge pull request neetcode-gh#1328 from kaziiriad/patch-1
Browse files Browse the repository at this point in the history
Update 212-Word-Search-II.py
  • Loading branch information
neetcode-gh authored Nov 2, 2022
2 parents 12689c5 + 6f72692 commit e21bdd3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/212-Word-Search-II.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ def findWords(self, board: List[List[str]], words: List[str]) -> List[str]:

def dfs(r, c, node, word):
if (
r < 0
or c < 0
or r == ROWS
or c == COLS
r not in range(ROWS)
or c not in range(COLS)
or board[r][c] not in node.children
or node.children[board[r][c]].refs < 1
or (r, c) in visit
Expand Down

0 comments on commit e21bdd3

Please sign in to comment.